Lines Matching refs:ts
62 getrawmonotonic(struct timespec *ts) in getrawmonotonic() argument
64 getnanouptime(ts); in getrawmonotonic()
74 timespec_valid(const struct timespec *ts) in timespec_valid() argument
76 if (ts->tv_sec < 0) in timespec_valid()
78 if (1000000000L <= ts->tv_nsec) in timespec_valid()
86 struct timespec ts; in ns_to_timespec() local
88 ts.tv_sec = (nsec / 1000000000L); in ns_to_timespec()
89 ts.tv_nsec = (nsec % 1000000000L); in ns_to_timespec()
90 if (ts.tv_nsec < 0) { in ns_to_timespec()
91 ts.tv_sec -= 1; in ns_to_timespec()
92 ts.tv_nsec += 1000000000L; in ns_to_timespec()
95 return ts; in ns_to_timespec()
99 timespec_to_ns(const struct timespec *ts) in timespec_to_ns() argument
101 return (((int64_t)ts->tv_sec * 1000000000LL) + ts->tv_nsec); in timespec_to_ns()
107 struct timespec ts; in ns_to_timeval() local
110 ts = ns_to_timespec(nsec); in ns_to_timeval()
111 TIMESPEC_TO_TIMEVAL(&tv, &ts); in ns_to_timeval()
133 set_normalized_timespec(struct timespec *ts, time_t sec, int64_t nsec) in set_normalized_timespec() argument
143 ts->tv_sec = sec; in set_normalized_timespec()
144 ts->tv_nsec = nsec; in set_normalized_timespec()