![]() |
Home | Libraries | People | FAQ | More |
Boost.Chrono is in the latest Boost release
in the folder /boost/chrono
.
Documentation, tests and examples folder are at boost/libs/chrono/
.
You can also access the latest (unstable?) state from the Boost trunk directories boost/chrono and libs/chrono. Just go to here and follow the instructions there for anonymous SVN access.
The simple way is to decompress (or checkout from SVN) the files in your BOOST_ROOT directory.
Boost.Chrono can be configured as a header-only
library defining BOOST_CHRONO_HEADER_ONLY
. However
Boost.Chrono depends on the non header-only library Boost.System, so that
you will need to link with boost_system.
Boost.System has an undocumented feature (use of macro BOOST_ERROR_CODE_HEADER_ONLY) to make it header only.
If BOOST_CHRONO_HEADER_ONLY
is not
defined you need to compile it and build the library before use, for example
using:
bjam libs/chrono/build
In particular, Boost.Chrono depends on:
for configuration purposes, ...
for throw_exception, ...
for cstdint conformance, ...
for MPL Assert and bool, logical ...
for operators, ...
for ratio, milli, micro, ...
for error_code, ...
for is_base, is_convertible, common_type, ...
for enable_if, ...
In addition to link with the Boost.Chrono library you need also to link with the Boost.System library. If Boost.System is configured defining BOOST_ERROR_CODE_HEADER_ONLY you will no need to link with it as the dependent part is header only then.
All functions in the library are exception-neutral and provide strong guarantee of exception safety as long as the underlying parameters provide it.
All functions in the library are thread-unsafe except when noted explicitly.
As Boost.Chrono doesn't use mutable global variables the thread-safety analysis is limited to the access to each instance variable. It is not thread safe to use a function that modifies the access to a user variable if another can be reading or writing it.
The implementation will eventually work with most C++03 conforming compilers. Currently I use to test with on:
Windows with
MinGW with
Ubuntu with * GCC 4.4.6 * GCC 4.4.6 -std=c++0x * GCC 4.5.4 * GCC 4.5.4 -std=c++0x * GCC 4.6.1 * GCC 4.6.1 -std=c++0x * Intel 12.1.3 * Intel 12.1.3 -std=c++0x
OsX with
The committed code is tested with much more compilers. There are two compilers (VACPP and Borland) that don't provide the needed features. Other as Intel and Sun have some issues with i/o. While everything compiles and link correctly, there are some runtime issues I have not cached yet. See the regression tests for details.
![]() |
Note |
---|---|
Please let us know how this works on other platforms/compilers. |
![]() |
Note |
---|---|
Please send any questions, comments and bug reports to boost <at> lists <dot> boost <dot> org. |