Function rcl_system_clock_init
Defined in File time.h
Function Documentation
-
rcl_ret_t rcl_system_clock_init(rcl_clock_t *clock, rcl_allocator_t *allocator)
Initialize a clock as a RCL_SYSTEM_TIME time source.
Initialize the clock as a RCL_SYSTEM_TIME time source.
This will allocate all necessary internal structures, and initialize variables. It is specifically setting up a system time source.
Attribute
Adherence
Allocates Memory
No
Thread-Safe
No [1]
Uses Atomics
No
Lock-Free
Yes
[1] Function is reentrant, but concurrent calls on the same object are not safe. Thread-safety is also affected by that of the object associated with the object.
- Parameters:
clock – [in] the handle to the clock which is being initialized
allocator – [in] The allocator to use for allocations
- Returns:
RCL_RET_OK if the time source was successfully initialized, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
- Returns:
RCL_RET_ERROR an unspecified error occur.