This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_timespec_diff

Function Documentation

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