Function rcl_clock_time_started

Function Documentation

bool rcl_clock_time_started(rcl_clock_t *clock)

Check if the clock has started.

This function returns true if the clock contains a time point value that is non-zero. Note that if data is uninitialized it may give a false positive.

This function is primarily used to check if a clock using ROS time has started. This is because it is possible that a simulator might be initialized paused, causing ROS time to be 0 until it is unpaused.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes

Uses Atomics

No

Lock-Free

Yes

Parameters:

clock[in] the handle to the clock which is being queried

Returns:

true if the clock has started, otherwise return false.