
27 Feb
2010
27 Feb
'10
8:52 a.m.
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