Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Aug 8, 2018
Merged

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

merged 6 commits into from
Aug 8, 2018

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Jul 27, 2018

(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
@@ -102,6 +102,11 @@ class Time
rcl_time_point_value_t
nanoseconds() const;

/// \return the seconds since epoch as a floating point number.
Copy link
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
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

dirk-thomas and others added 4 commits July 27, 2018 18:27
* construct TimerBase/GenericTimer with Clock

* pass rcl_time_point_value_t to rcl_clock_get_now

* update docblocks
@sloretz
Copy link
Contributor Author

sloretz commented Aug 8, 2018

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
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this pull request Aug 5, 2022
…est (ros2#526)

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
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.

None yet

3 participants