Function rcl_clock_fini

Function Documentation

rcl_ret_t rcl_clock_fini(rcl_clock_t *clock)

Finalize a clock.

This will deallocate all necessary internal structures, and clean up any variables. It can be combined with any of the init functions.

Passing a clock with type RCL_CLOCK_UNINITIALIZED will result in RCL_RET_INVALID_ARGUMENT being returned.

This function is not thread-safe with any other function operating on the same clock object.

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 finalized

Returns:

RCL_RET_OK if the time source was successfully finalized, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_ERROR an unspecified error occur.