void rc_nanosleep(uint64_t ns)
Sleep in nanoseconds.
uint64_t rc_nanos_since_epoch(void)
Returns the number of nanoseconds since epoch using system CLOCK_REALTIME.
struct timespec timespec
Definition: time.h:26
struct timeval timeval
Definition: time.h:27
uint64_t rc_timespec_to_millis(timespec ts)
Returns a number of milliseconds corresponding to a timespec struct.
void rc_usleep(unsigned int us)
Sleep in microseconds.
uint64_t rc_nanos_thread_time(void)
Returns the number of nanoseconds from when when the calling thread was started in CPU time...
timespec rc_timespec_diff(timespec A, timespec B)
Returns the time difference between two timespec structs as another timespec.
uint64_t rc_nanos_since_boot(void)
Returns the number of nanoseconds since system boot using CLOCK_MONOTONIC.
uint64_t rc_timeval_to_micros(timeval tv)
Returns a number of microseconds corresponding to a timeval struct.
uint64_t rc_timespec_to_micros(timespec ts)
Returns a number of microseconds corresponding to a timespec struct.
uint64_t rc_timeval_to_millis(timeval tv)
Returns a number of milliseconds corresponding to a timeval struct.
void rc_timespec_add(timespec *start, double seconds)
Adds an amount of time in seconds to a timespec struct.