Boost logo

Boost Users :

Subject: [Boost-users] [chrono] New Features + Bug fixes + Updated documentation
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-12-08 17:46:18


I'm pleased to annonce the new version of the Boost.Chrono library. Even if the library is not yet ready for review I wanted to share it with you.

The library can be downloaded from the vault and the documentation is online on the sandbox

For the moment I'm not able to test it on Windows and Mac platforms.
Could you check if there are some regressions on Windows or on Mac platforms?

Of course, any comments or suggestions are welcome.

If there is a volontary review manager that can start inspecting the library s/he is also welcome :).

This library is based on the Beman's boostified version of the probe of concept of Howard. Many thanks to Howard the originator of the library and to Beman to start the boostification.

Next follows the contents of the library and the updates of the new version

Version 0.1.0, April 29, 2009 Beman's boostified version
* The C++0x Standard Library's class common_type.
* The C++0x Standard Library's compile-time rational arithmetic.
* The C++0x Standard Library's time utilities, including:
    * Class template duration
    * Class template time_point
    * Clocks:
        * system_clock
        * monotonic_clock
        * high_resolution_clock
    * Class template timer, with typedefs:
        * system_timer
        * monotonic_timer
        * high_resolution_timer
    * Process clocks and timers:
        * process_clock, capturing real, user-CPU, and system-CPU times.
        * process_timer, capturing elapsed real, user-CPU, and system-CPU times.
        * run_timer, convenient reporting of process_timer results.

Version 0.2.0, December 8, 2009 + New Features + Bug fixes + Updated documentation
* Added ratio construction and assignment from an equivalent ratio (LWG 1281. CopyConstruction and Assignment between ratios having the same normalized form)
* Added nested ratio typedef type (LWG 1281. CopyConstruction and Assignment between ratios having the same normalized form)
* Added BOOST_CHRONO_HAS_CLOCK_MONOTONIC macro to state if monotonic_clock is provided on a platform.
* Added duration operator% (LWG 934. duration is missing operator%)
* Complete duration operator* and operator/

* Use INTMAC_C to name intmax_t constants instead of LL.
* Separate chrono.cpp on # files win/chrono.cpp, mac/chrono.cpp and posix/chrono.cpp to make easier the maintenance on different platforms.
* Separate process_clock.cpp on # files win/process_clock.cpp, mac/process_clock.cpp and posix/process_clock.cpp to make easir the maintenace on different platforms.
* Added the error_code prototype for monotonic_clock::now for mac/chono.cpp
* Fully implement mac/chrono.cpp with error handling.
* Take care on POSIX systems when CLOCK_MONOTONIC is not defined.

* The documentation is written now using quick-book using as base "N2661 - A Foundation to Sleep On".

Fixed Bugs
* operator/ was ambiguous: Disambiguate duration operator/
* CLOCK_MONOTONIC is not defined with cygwin/gcc 3.4: Disable code when BOOST_CHRONO_HAS_CLOCK_MONOTONIC is not defined.
* result of metafunctions ratio_multiply and ratio_divide were not normalized ratios: Use of the nested ratio typedef type on ratio arithmetic operations.
* Copy constructor from similar duration masked the defaulted operations: Added duration defaulted implementations

Note that the comon_type class should be integrated by Boost.TypeTraits, class ratio will be proposed as a standalone library Boost.Ratio, and the Timer and Process clock part could be proposed as an update of Boost.Timer.

Best regards,
Vicente Juan Botet Escribá

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at