Lines Matching refs:ts
73 #define getrawmonotonic(ts) nanouptime(ts) argument
78 struct timespec ts; in timespec_sub() local
80 timespecsub(&lhs, &rhs, &ts); in timespec_sub()
82 return ts; in timespec_sub()
86 set_normalized_timespec(struct timespec *ts, time_t sec, int64_t nsec) in set_normalized_timespec() argument
89 ts->tv_sec = sec; in set_normalized_timespec()
90 ts->tv_nsec = nsec; in set_normalized_timespec()
94 timespec_to_ns(const struct timespec *ts) in timespec_to_ns() argument
96 return ((ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec); in timespec_to_ns()
102 struct timespec ts; in ns_to_timespec() local
106 ts.tv_sec = 0; in ns_to_timespec()
107 ts.tv_nsec = 0; in ns_to_timespec()
108 return (ts); in ns_to_timespec()
111 ts.tv_sec = nsec / NSEC_PER_SEC; in ns_to_timespec()
114 ts.tv_sec--; in ns_to_timespec()
117 ts.tv_nsec = rem; in ns_to_timespec()
118 return (ts); in ns_to_timespec()
122 timespec_valid(const struct timespec *ts) in timespec_valid() argument
124 if (ts->tv_sec < 0 || ts->tv_sec > 100000000 || in timespec_valid()
125 ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) in timespec_valid()