You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update rcutils_steady_time_now to return the same data as std::chrono (#357)
* Update rcutils_steady_time_now to return the same data as std::chrono
Based on an investigation several years ago, rcutils_steady_time_now
has slightly different behavior than std::chrono::now . In
particular, on Linux rcutils_steady_time_now was using
CLOCK_MONOTONIC_RAW, while std::chrono is using CLOCK_MONOTONIC.
On macOS, rcutils_steady_time_now was using SYSTEM_CLOCK, while std::chrono
was using CLOCK_MONOTONIC_RAW. Fix both of these so they
match what std::chrono does, and in the case of macOS, significantly
simplify the code by switching to clock_gettime.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
0 commit comments