|
Timer Library
Version 2
|
"How long does my C++ code take to run?"
The Boost Timer library
answers that question and does so portably, with as little as one #include and one
additional line of code.
The Boost Timer library has two distinct sets of
components:
- If you are new to the library, please go directly to the version 2
CPU timers page.
- If you are interested in
the original library, now deprecated, read on below.
These version 2 components conform to current Boost practice:
- The interfaces and their semantics are the same across all platforms.
- The internal implementation uses operating system specific APIs to achieve
higher precision and supply functionality not otherwise available.
- The headers live in a sub-directory,
<boost/timer/...>
.
- The content is in a sub-namespace,
boost::timer
.
These version 1 components are deprecated. They date from the earliest days
of Boost and do not conform to current Boost practice:
- The interfaces are the same across all platforms, but the semantics differ
according to platform. Wall-clock time is measured on Windows, while CPU time
is measured on POSIX-like systems.
- The internal implementation uses only C/C++ standard library functions, so
cannot supply desirable precision and functionality.
- The headers live in the main Boost header directory.
- The content are in namespace
boost
.
Revised:
07 October 2011
� Copyright Beman Dawes 2001, 2011
Distributed under the Boost Software License, Version 1.0. See
www.boost.org/LICENSE_1_0.txt