Boost logo

Boost :

Subject: Re: [boost] [date_time] monotonic_time() proposal
From: Dmitry Goncharov (dgoncharov_at_[hidden])
Date: 2010-02-27 03:52:31


Andrey Semashev wrote:
>
> I think there is something similar in Boost.Chrono in the sandbox.
Yes, there is.

> I think it would be a useful addition to Boost, whether as a part of
> Boost.DateTime or Boost.Chrono. Just make sure that it doesn't break
> microsec_clock if a monotonic timer is not available.
Good point.
It is possible to fallback to universal_time() when no monotonic timer
is available. In this case the users of microsec_clock can safely use
monotonic_time() on any platform.
Another approach is to remove monotonic_time() away from microsec_clock
if no monotonic timer is available. In this case the users'll have to
handle this situation. Most of the time they'll end up using
universal_time() anyway.

BR, Dmitry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk