Closed flixr closed 7 years ago
@wjwwood @mikaelarguedas What do you think about adding a new time class like MonotonicTime
(or maybe better named SteadyTime
in accordance to C++11 naming?).
This would already make it much easier to compute time deltas that should not be affected by NTP, PTP, etc adjusting the system time.
closing in favor of #57
Add a new MonotonicTime which uses CLOCK_MONOTONIC to prevent issues with time jumps.
If
clock_gettime
is not available it will fall back to normal wall time... but that shouldn't be the case on many Linux systems anymore.Didn't look at the Windows implementation so far, also just returns wall time there.
See https://github.com/ros/bond_core/issues/16 and https://github.com/ros/nodelet_core/issues/35 for discussions why this could be useful.