Lines Matching refs:timespec
78 int64_t timespec_to_ns(struct timespec ts) in timespec_to_ns()
83 struct timespec timespec_add_ns(struct timespec ts, int64_t ns) in timespec_add_ns()
85 struct timespec res; in timespec_add_ns()
94 struct timespec timespec_add(struct timespec ts1, struct timespec ts2) in timespec_add()
98 return timespec_add_ns((struct timespec){0}, ns1 + ns2); in timespec_add()
101 struct timespec timespec_sub(struct timespec ts1, struct timespec ts2) in timespec_sub()
105 return timespec_add_ns((struct timespec){0}, ns1 - ns2); in timespec_sub()
108 struct timespec timespec_elapsed(struct timespec start) in timespec_elapsed()
110 struct timespec end; in timespec_elapsed()
116 struct timespec timespec_div(struct timespec ts, int divisor) in timespec_div()
120 return timespec_add_ns((struct timespec){0}, ns); in timespec_div()