Improved the code for BOOST_NO_STDC_NAMESPACE workarounds.

[SVN r26161]
This commit is contained in:
Andreas Huber
2004-11-09 20:40:59 +00:00
parent f42b50dad6
commit e072a672e6
5 changed files with 44 additions and 59 deletions

View File

@@ -91,6 +91,16 @@
#include <iomanip>
#include <ctime>
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std
{
using ::clock_t;
using ::clock;
}
#endif
#ifdef BOOST_INTEL
# pragma warning( disable: 304 ) // access control not specified
# pragma warning( disable: 444 ) // destructor for base is not virtual
@@ -318,23 +328,14 @@ int main()
std::cout << "\nSending " << noOfEvents << " events. Please wait...\n";
const unsigned long startEvents2 = eventsSentTotal;
#ifdef BOOST_NO_STDC_NAMESPACE
const clock_t startTime2 = clock();
#else
const std::clock_t startTime2 = std::clock();
#endif
for ( unsigned int lap = 0; lap < noOfLaps; ++lap )
{
VisitAllStates< NO_OF_BITS - 1, false >( bitMachine );
}
#ifdef BOOST_NO_STDC_NAMESPACE
const clock_t elapsedTime2 = clock() - startTime2;
#else
const std::clock_t elapsedTime2 = std::clock() - startTime2;
#endif
const unsigned int eventsSent2 = eventsSentTotal - startEvents2;
std::cout << "Time to dispatch one event and\n" <<
"perform the resulting transition: ";