auto_cpu_timer_example.cpp 432 B

12345678910111213141516171819
  1. // auto_cpu_timer_example.cpp ------------------------------------------------------//
  2. // Copyright Beman Dawes 2006
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // See http://www.boost.org/LICENSE_1_0.txt
  5. #include <boost/timer/timer.hpp>
  6. #include <cmath>
  7. int main()
  8. {
  9. boost::timer::auto_cpu_timer t;
  10. for ( long i = 0; i < 100000000; ++i )
  11. std::sqrt( 123.456L ); // burn some time
  12. return 0;
  13. }