Function rcl_timer_reset

Function Documentation

rcl_ret_t rcl_timer_reset(rcl_timer_t *timer)

Reset a timer.

This function can be called on a timer, canceled or not. For all timers it will reset the last call time to now. For canceled timers it will additionally make the timer not canceled.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes

Uses Atomics

Yes

Lock-Free

Yes [1]

[1] if returns true for

Parameters:

timer[inout] the timer to be reset

Returns:

RCL_RET_OK if the timer was reset successfully, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_TIMER_INVALID if the timer is invalid, or

Returns:

RCL_RET_ERROR an unspecified error occur.