1// run_timer_example.cpp ---------------------------------------------------//
2
3// Copyright Beman Dawes 2006, 2008
4// Copyright 2009/2010 Vicente J. Botet Escriba
5
6// Distributed under the Boost Software License, Version 1.0.
7// See http://www.boost.org/LICENSE_1_0.txt
8
9// See http://www.boost.org/libs/chrono for documentation.
10
11#include <boost/chrono/process_times.hpp>
12#include <cmath>
13
14int main()
15{
16 boost::chrono::run_timer t;
17
18 for ( long i = 0; i < 10000; ++i )
19 std::sqrt( x: 123.456L ); // burn some time
20
21 return 0;
22}
23

source code of boost/libs/chrono/example/run_timer_example.cpp