Lines Matching refs:ts
74 #define getrawmonotonic(ts) nanouptime(ts) argument
79 struct timespec ts; in timespec_sub() local
81 timespecsub(&lhs, &rhs, &ts); in timespec_sub()
83 return ts; in timespec_sub()
87 set_normalized_timespec(struct timespec *ts, time_t sec, int64_t nsec) in set_normalized_timespec() argument
90 ts->tv_sec = sec; in set_normalized_timespec()
91 ts->tv_nsec = nsec; in set_normalized_timespec()
95 timespec_to_ns(const struct timespec *ts) in timespec_to_ns() argument
97 return ((ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec); in timespec_to_ns()
103 struct timespec ts; in ns_to_timespec() local
107 ts.tv_sec = 0; in ns_to_timespec()
108 ts.tv_nsec = 0; in ns_to_timespec()
109 return (ts); in ns_to_timespec()
112 ts.tv_sec = nsec / NSEC_PER_SEC; in ns_to_timespec()
115 ts.tv_sec--; in ns_to_timespec()
118 ts.tv_nsec = rem; in ns_to_timespec()
119 return (ts); in ns_to_timespec()
125 timespec_valid(const struct timespec *ts) in timespec_valid() argument
127 if (ts->tv_sec < 0 || ts->tv_sec > 100000000 || in timespec_valid()
128 ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) in timespec_valid()