Function rcl_timer_call_with_info

Function Documentation

rcl_ret_t rcl_timer_call_with_info(rcl_timer_t *timer, rcl_timer_call_info_t *call_info)

Same as rcl_timer_call() except that it also retrieves the actual and expected call time.

Same as rcl_timer_call() except that it also retrieves the actual and expected call time.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes [1]

Uses Atomics

Yes

Lock-Free

Yes [2]

[1] user callback might not be thread-safe

[2] if returns true for

Parameters:
  • timer[inout] the handle to the timer to call

  • call_info[out] the struct in which the actual and expected call times are stored

Returns:

RCL_RET_OK if the timer was called 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_TIMER_CANCELED if the timer has been canceled, or

Returns:

RCL_RET_ERROR an unspecified error occur.