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