Lines Matching refs:timespec
61 int64_t timespec_to_ns(struct timespec ts) in timespec_to_ns()
66 struct timespec timespec_add_ns(struct timespec ts, int64_t ns) in timespec_add_ns()
68 struct timespec res; in timespec_add_ns()
77 struct timespec timespec_add(struct timespec ts1, struct timespec ts2) in timespec_add()
81 return timespec_add_ns((struct timespec){0}, ns1 + ns2); in timespec_add()
84 struct timespec timespec_sub(struct timespec ts1, struct timespec ts2) in timespec_sub()
88 return timespec_add_ns((struct timespec){0}, ns1 - ns2); in timespec_sub()
91 struct timespec timespec_elapsed(struct timespec start) in timespec_elapsed()
93 struct timespec end; in timespec_elapsed()
99 struct timespec timespec_div(struct timespec ts, int divisor) in timespec_div()
103 return timespec_add_ns((struct timespec){0}, ns); in timespec_div()