Rclcpp: add toSec() function to the rclcpp::Time Class

Created on 13 Oct 2019  路  2Comments  路  Source: ros2/rclcpp

Feature request

In ROS1, we can get duration and time in seconds.
Via toSec() method. (ros::TimeBase< T, D > Class Template Reference)
But now, I think there is no API to get the time and duration in Seconds.
So, I want to add toSec() method to the rclcpp::Time Class

Feature description


toSec() method returns the rclcpp::Time and Duration data in Seconds.

Implementation considerations

Most helpful comment

That functionality already exists since #526. Please note the docblock about the potential precision loss.

All 2 comments

That functionality already exists since #526. Please note the docblock about the potential precision loss.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings