Skip to content

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

Merged
sloretz merged 6 commits intomasterfrom
use_ros2_time
Aug 8, 2018
Merged

Add rclcpp::Time::seconds()#526
sloretz merged 6 commits intomasterfrom
use_ros2_time

Conversation

@sloretz
Copy link
Copy Markdown
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
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

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
Copy Markdown
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.

3 participants