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

Document clock types #578

Merged
merged 3 commits into from
Mar 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions rcl/include/rcl/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ typedef rcutils_time_point_value_t rcl_time_point_value_t;
typedef rcutils_duration_value_t rcl_duration_value_t;

/// Time source type, used to indicate the source of a time measurement.
/**
* RCL_ROS_TIME will report the latest value reported by a ROS time source, or
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this is the appropriate place, but should we describe what a "ROS time source" is? I'm not sure everyone will be familiar with it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just link to the design document.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added a link to the design doc: c20cafe

* if a ROS time source is not active it reports the same as RCL_SYSTEM_TIME.
* For more information about ROS time sources, refer to the design document:
* http://design.ros2.org/articles/clock_and_time.html
*
* RCL_SYSTEM_TIME reports the same value as the system clock.
*
* RCL_STEADY_TIME reports a value from a monotonically increasing clock.
*/
typedef enum rcl_clock_type_t
{
RCL_CLOCK_UNINITIALIZED = 0,
Expand Down