Expose timespec_add

This commit is contained in:
Aaron Culliney 2016-01-07 22:41:10 -08:00
parent 9bbfca3193
commit a64941694f
2 changed files with 2 additions and 1 deletions

View File

@ -126,7 +126,7 @@ struct timespec timespec_diff(struct timespec start, struct timespec end, bool *
return t;
}
static inline struct timespec timespec_add(struct timespec start, unsigned long nsecs) {
struct timespec timespec_add(struct timespec start, unsigned long nsecs) {
start.tv_nsec += nsecs;
if (start.tv_nsec > NANOSECONDS_PER_SECOND)

View File

@ -66,6 +66,7 @@ extern READONLY pthread_t cpu_thread_id;
* calculate the difference between two timespec structures
*/
struct timespec timespec_diff(struct timespec start, struct timespec end, bool *negative);
struct timespec timespec_add(struct timespec start, unsigned long nsecs);
/*
* start CPU thread