Defined in File time.h
timespec rc_timespec_diff(timespec A, timespec B)¶
Returns the time difference between two timespec structs as another timespec.
Convenient for use with nanosleep() function and accurately timed loops. Unlike timespec_sub defined in time.h, rc_timespec_diff does not care which came first, A or B. A positive difference in time is always returned.
A – [in] timespec struct
B – [in] timespec struct
timespec struct of the difference, always positive