Skip to content

Add rclcpp::Time::seconds() - #526

Merged
sloretz merged 6 commits into
masterfrom
use_ros2_time
Aug 8, 2018
Merged

sloretz merged 6 commits into
masterfrom
use_ros2_time

Conversation

@sloretz

@sloretz sloretz commented Jul 27, 2018 •

Copy link
Copy Markdown
Contributor

(edit) #482 Edit oops, this doesn't fix 482. That ticket is about duration types.

This adds seconds() which returns the seconds since epoch as a double.

Connects to ros2/geometry2#67

@sloretz sloretz added the in review Waiting for review (Kanban column) label Jul 27, 2018
@sloretz sloretz self-assigned this Jul 27, 2018
rcl_time_point_value_t
nanoseconds() const;

/// \return the seconds since epoch as a floating point number.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the docblock contain a note/warning about potential rounding errors? I think that was one reason to omit the function until now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added warning in 7b736c9

@sloretz

sloretz commented Aug 8, 2018

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews. CI in ros2/geometry2#67 (comment) looks green, so I'll merge this.

@sloretz
sloretz merged commit ea04765 into master Aug 8, 2018
@sloretz sloretz removed the in review Waiting for review (Kanban column) label Aug 8, 2018
@sloretz
sloretz deleted the use_ros2_time branch August 8, 2018 23:04
@dirk-thomas dirk-thomas mentioned this pull request Sep 21, 2018
5 of 7 tasks
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this pull request Aug 5, 2022
bartalor pushed a commit to bartalor/rclcpp that referenced this pull request Jul 15, 2026
* Get seconds since epoch as double
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants