Home
last modified time | relevance | path

Searched refs:ts (Results 1 – 14 of 14) sorted by relevance

/time/
A Dtst-clock.c32 struct timespec ts; in clock_test() local
37 memset (&ts, '\0', sizeof ts); in clock_test()
43 if (clock_getres (cl, &ts) == 0) in clock_test()
45 if (ts.tv_nsec < 0 || ts.tv_nsec >= 1000000000) in clock_test()
52 cl, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec); in clock_test()
60 memset (&ts, '\0', sizeof ts); in clock_test()
66 if (clock_gettime (cl, &ts) == 0) in clock_test()
68 if (ts.tv_nsec < 0 || ts.tv_nsec >= 1000000000) in clock_test()
77 cl, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec); in clock_test()
79 if (memcmp (&ts, &old_ts, sizeof ts) == 0) in clock_test()
[all …]
A Dtst-timespec_getres.c26 struct timespec ts; in do_test() local
27 TEST_COMPARE (timespec_getres (&ts, 0), 0); in do_test()
32 struct timespec ts; in do_test() local
33 TEST_COMPARE (timespec_getres (&ts, TIME_UTC), TIME_UTC); in do_test()
36 TEST_VERIFY (ts.tv_sec == 0); in do_test()
37 TEST_VERIFY (ts.tv_nsec > 0); in do_test()
38 TEST_VERIFY (ts.tv_nsec < 1000000000); in do_test()
44 TEST_COMPARE (ts.tv_sec, cts.tv_sec); in do_test()
45 TEST_COMPARE (ts.tv_nsec, cts.tv_nsec); in do_test()
A Dtst-timespec_get.c26 struct timespec ts; in do_test() local
27 TEST_COMPARE (timespec_get (&ts, 0), 0); in do_test()
31 struct timespec ts; in do_test() local
32 TEST_COMPARE (timespec_get (&ts, TIME_UTC), TIME_UTC); in do_test()
33 TEST_VERIFY (ts.tv_nsec >= 0); in do_test()
34 TEST_VERIFY (ts.tv_nsec < 1000000000); in do_test()
A Dtime.c25 struct timespec ts; in time() local
26 __clock_gettime (TIME_CLOCK_GETTIME_CLOCKID, &ts); in time()
29 *timer = ts.tv_sec; in time()
30 return ts.tv_sec; in time()
A Dftime.c25 struct timespec ts; in ftime() local
26 __clock_gettime (CLOCK_REALTIME, &ts); in ftime()
28 timebuf->time = ts.tv_sec; in ftime()
29 timebuf->millitm = ts.tv_nsec / 1000000; in ftime()
A Dstime.c30 struct timespec ts; in __stime() local
31 ts.tv_sec = *when; in __stime()
32 ts.tv_nsec = 0; in __stime()
34 return __clock_settime (CLOCK_REALTIME, &ts); in __stime()
A Dtst-clock_nanosleep.c35 struct timespec ts = { 1, 0 }; in clock_nanosleep_test() local
36 TEMP_FAILURE_RETRY (clock_nanosleep (CLOCK_REALTIME, 0, &ts, &ts)); in clock_nanosleep_test()
54 struct timespec ts = { TYPE_MAXIMUM (time_t), 0 }; in clock_nanosleep_large_timeout() local
55 int r = clock_nanosleep (CLOCK_REALTIME, 0, &ts, NULL); in clock_nanosleep_large_timeout()
A Dtst-clock2.c17 struct timespec ts; in do_test() local
18 if (clock_gettime (CLOCK_MONOTONIC, &ts) != 0) in do_test()
25 if (clock_settime (CLOCK_MONOTONIC, &ts) != -1) in do_test()
A Dgettimeofday.c31 struct timespec ts; in ___gettimeofday() local
32 if (__clock_gettime (CLOCK_REALTIME, &ts)) in ___gettimeofday()
35 TIMESPEC_TO_TIMEVAL (tv, &ts); in ___gettimeofday()
A Dsettimeofday.c37 struct timespec ts; in __settimeofday() local
38 TIMEVAL_TO_TIMESPEC (tv, &ts); in __settimeofday()
39 return __clock_settime (CLOCK_REALTIME, &ts); in __settimeofday()
A Dtimespec_get.c23 timespec_get (struct timespec *ts, int base) in timespec_get() argument
27 __clock_gettime (CLOCK_REALTIME, ts); in timespec_get()
A Dtimespec_getres.c24 timespec_getres (struct timespec *ts, int base) in timespec_getres() argument
28 __clock_getres (CLOCK_REALTIME, ts); in timespec_getres()
A Dtst-itimer.c41 struct timespec ts = { .tv_sec = sec, .tv_nsec = 0 }; in intr_sleep() local
42 while (nanosleep (&ts, &ts) == -1 && errno == EINTR) in intr_sleep()
/time/sys/
A Dtime.h38 # define TIMEVAL_TO_TIMESPEC(tv, ts) { \ argument
39 (ts)->tv_sec = (tv)->tv_sec; \
40 (ts)->tv_nsec = (tv)->tv_usec * 1000; \
42 # define TIMESPEC_TO_TIMEVAL(tv, ts) { \ argument
43 (tv)->tv_sec = (ts)->tv_sec; \
44 (tv)->tv_usec = (ts)->tv_nsec / 1000; \

Completed in 11 milliseconds