Function rcl_timer_is_ready

Function Documentation

rcl_ret_t rcl_timer_is_ready(const rcl_timer_t *timer, bool *is_ready)

Calculates whether or not the timer should be called.

The result is true if the time until next call is less than, or equal to, 0 and the timer has not been canceled. Otherwise the result is false, indicating the timer should not be called.

The is_ready argument must point to an allocated bool object, as the result is copied into it.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes

Uses Atomics

Yes

Lock-Free

Yes [1]

[1] if returns true for

Parameters:
  • timer[in] the handle to the timer which is being checked

  • is_ready[out] the bool used to store the result of the calculation

Returns:

RCL_RET_OK if the last call time was retrieved successfully, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_TIMER_INVALID if the timer->impl is invalid, or

Returns:

RCL_RET_ERROR an unspecified error occur.