Searched refs:ts_end (Results 1 – 1 of 1) sorted by relevance
39 static inline int64_t time_diff(timespec& ts_start, timespec& ts_end) { in time_diff() argument40 if (ts_start.tv_sec == ts_end.tv_sec) { in time_diff()41 return (int64_t)ts_end.tv_nsec - ts_start.tv_nsec; in time_diff()43 return (int64_t)(ts_end.tv_sec - 1 - ts_start.tv_sec) * NS_PER_S + in time_diff()44 ts_end.tv_nsec + NS_PER_S - ts_start.tv_nsec; in time_diff()61 timespec ts_end; in TEST() local62 clock_gettime(CLOCK_MONOTONIC, &ts_end); in TEST()66 ASSERT_GE(time_diff(ts, ts_end), 0); in TEST()67 ASSERT_LT(time_diff(ts, ts_end), TIME_THRESHOLD_IN_NS); in TEST()