Function rcl_difference_times
Defined in File time.h
Function Documentation
-
rcl_ret_t rcl_difference_times(const rcl_time_point_t *start, const rcl_time_point_t *finish, rcl_duration_t *delta)
Compute the difference between two time points.
This function takes two time points and computes the duration between them. The two time points must be using the same time abstraction, and the resultant duration will also be of the same abstraction.
The value will be computed as duration = finish - start. If start is after finish the duration will be negative.
Attribute
Adherence
Allocates Memory
No
Thread-Safe
Yes
Uses Atomics
No
Lock-Free
Yes
- Parameters:
start – [in] The time point for the start of the duration.
finish – [in] The time point for the end of the duration.
delta – [out] The duration between the start and finish.
- Returns:
RCL_RET_OK if the difference was computed successfully, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
- Returns:
RCL_RET_ERROR an unspecified error occur.