[ros-users] [Discourse.ros.org] [Next Generation ROS] ROS 2 Time vs std::chrono

andreaspasternak ros.discourse at gmail.com
Mon Oct 8 23:43:58 UTC 2018



@sloretz: Oh, that is a really good point! Thank you!

They should have designed `std::chrono` as they fixed `std::allocators`. :slight_smile:

This has the interesting implication that ROS 2 time can never be converted to `std::chrono` time and used with the standard library as it is not determinable from which clock the time came.

I will check if it is possible to create a `std::chrono` clock which at least works on a global level such that an error is produces when someone tries to switch a node to a different time than some global setting.





---
[Visit Topic](https://discourse.ros.org/t/ros-2-time-vs-std-chrono/6293/7) or reply to this email to respond.




More information about the ros-users mailing list