From 4de17426f90dc6859e1dc156261ba7f30768aabd Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Thu, 20 Feb 2020 04:59:05 -0800 Subject: [PATCH 1/3] Document clock types Resolves #552 Signed-off-by: Jacob Perron --- rcl/include/rcl/time.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rcl/include/rcl/time.h b/rcl/include/rcl/time.h index c5dea13d1..02e17579a 100644 --- a/rcl/include/rcl/time.h +++ b/rcl/include/rcl/time.h @@ -46,6 +46,14 @@ 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 + * if a ROS time source is not active it reports the same as RCL_SYSTEM_TIME. + * + * RCL_SYSTEM_TIME reports the same value as the system clock. + * + * RCL_STEADY_TIME reports a value from a monotionically increasing clock. + */ typedef enum rcl_clock_type_t { RCL_CLOCK_UNINITIALIZED = 0, From c20cafeb37452d154e3619687ab1c9dabdc74694 Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Mon, 24 Feb 2020 09:42:40 -0800 Subject: [PATCH 2/3] Add link to design doc Signed-off-by: Jacob Perron --- rcl/include/rcl/time.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rcl/include/rcl/time.h b/rcl/include/rcl/time.h index 02e17579a..821d4ac82 100644 --- a/rcl/include/rcl/time.h +++ b/rcl/include/rcl/time.h @@ -49,6 +49,8 @@ typedef rcutils_duration_value_t rcl_duration_value_t; /** * RCL_ROS_TIME will report the latest value reported by a ROS time source, or * 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. * From 97382bad38d1e4720c7613e774facf73b511aeb1 Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Mon, 2 Mar 2020 09:54:58 -0800 Subject: [PATCH 3/3] Fix spelling Signed-off-by: Jacob Perron --- rcl/include/rcl/time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcl/include/rcl/time.h b/rcl/include/rcl/time.h index 821d4ac82..aab3d5f77 100644 --- a/rcl/include/rcl/time.h +++ b/rcl/include/rcl/time.h @@ -54,7 +54,7 @@ typedef rcutils_duration_value_t rcl_duration_value_t; * * RCL_SYSTEM_TIME reports the same value as the system clock. * - * RCL_STEADY_TIME reports a value from a monotionically increasing clock. + * RCL_STEADY_TIME reports a value from a monotonically increasing clock. */ typedef enum rcl_clock_type_t {