Lines Matching refs:ts
628 itimerspec ts; in SetTime() local
629 ts.it_value.tv_sec = value_s; in SetTime()
630 ts.it_value.tv_nsec = value_ns; in SetTime()
631 ts.it_interval.tv_sec = interval_s; in SetTime()
632 ts.it_interval.tv_nsec = interval_ns; in SetTime()
633 ASSERT_EQ(0, timer_settime(t, 0, &ts, nullptr)); in SetTime()
682 itimerspec ts; in TEST() local
683 ts.it_value.tv_sec = 0; in TEST()
684 ts.it_value.tv_nsec = 1; in TEST()
685 ts.it_interval.tv_sec = 0; in TEST()
686 ts.it_interval.tv_nsec = 0; in TEST()
687 ASSERT_EQ(0, timer_settime(timer_id, 0, &ts, nullptr)); in TEST()
922 itimerspec ts; in TEST() local
923 ts.it_value.tv_sec = 1; in TEST()
924 ts.it_value.tv_nsec = 0; in TEST()
925 ts.it_interval.tv_sec = 0; in TEST()
926 ts.it_interval.tv_nsec = 0; in TEST()
927 ASSERT_EQ(0, timer_settime(tdd.timer_id, 0, &ts, nullptr)); in TEST()
969 timespec ts; in TEST() local
970 ASSERT_EQ(0, clock_gettime(CLOCK_REALTIME, &ts)); in TEST()
974 timespec ts; in TEST() local
975 ASSERT_EQ(0, clock_gettime(CLOCK_MONOTONIC, &ts)); in TEST()
979 timespec ts; in TEST() local
980 ASSERT_EQ(0, clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts)); in TEST()
984 timespec ts; in TEST() local
985 ASSERT_EQ(0, clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts)); in TEST()
989 timespec ts; in TEST() local
990 ASSERT_EQ(0, clock_gettime(CLOCK_BOOTTIME, &ts)); in TEST()
995 timespec ts; in TEST() local
996 ASSERT_EQ(-1, clock_gettime(-1, &ts)); in TEST()
1001 timespec ts; in TEST() local
1002 ASSERT_EQ(0, clock_getres(CLOCK_REALTIME, &ts)); in TEST()
1003 ASSERT_EQ(1, ts.tv_nsec); in TEST()
1004 ASSERT_EQ(0, ts.tv_sec); in TEST()
1008 timespec ts; in TEST() local
1009 ASSERT_EQ(0, clock_getres(CLOCK_MONOTONIC, &ts)); in TEST()
1010 ASSERT_EQ(1, ts.tv_nsec); in TEST()
1011 ASSERT_EQ(0, ts.tv_sec); in TEST()
1015 timespec ts; in TEST() local
1016 ASSERT_EQ(0, clock_getres(CLOCK_PROCESS_CPUTIME_ID, &ts)); in TEST()
1020 timespec ts; in TEST() local
1021 ASSERT_EQ(0, clock_getres(CLOCK_THREAD_CPUTIME_ID, &ts)); in TEST()
1025 timespec ts; in TEST() local
1026 ASSERT_EQ(0, clock_getres(CLOCK_BOOTTIME, &ts)); in TEST()
1027 ASSERT_EQ(1, ts.tv_nsec); in TEST()
1028 ASSERT_EQ(0, ts.tv_sec); in TEST()
1033 timespec ts = { -1, -1 }; in TEST() local
1034 ASSERT_EQ(-1, clock_getres(-1, &ts)); in TEST()
1036 ASSERT_EQ(-1, ts.tv_nsec); in TEST()
1037 ASSERT_EQ(-1, ts.tv_sec); in TEST()
1066 timespec ts; in TEST() local
1067 ASSERT_EQ(0, clock_gettime(clockid, &ts)); in TEST()
1073 timespec ts; in TEST() local
1074 ASSERT_EQ(0, clock_gettime(clockid, &ts)); in TEST()
1093 timespec ts; in TEST() local
1094 ASSERT_EQ(-1, clock_settime(-1, &ts)); in TEST()
1113 const timespec ts = {.tv_nsec = 5000000}; in TEST() local
1114 ASSERT_EQ(0, clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, nullptr)); in TEST()
1121 const timespec ts = {.tv_nsec = 5000000}; in TEST() local
1122 ASSERT_EQ(0, nanosleep(&ts, nullptr)); in TEST()
1128 timespec ts = {.tv_sec = -1}; in TEST() local
1130 ASSERT_EQ(-1, nanosleep(&ts, nullptr)); in TEST()
1295 timespec ts = {}; in TEST() local
1296 ASSERT_EQ(TIME_UTC, timespec_get(&ts, TIME_UTC)); in TEST()
1297 ASSERT_EQ(TIME_MONOTONIC, timespec_get(&ts, TIME_MONOTONIC)); in TEST()
1298 ASSERT_EQ(TIME_ACTIVE, timespec_get(&ts, TIME_ACTIVE)); in TEST()
1299 ASSERT_EQ(TIME_THREAD_ACTIVE, timespec_get(&ts, TIME_THREAD_ACTIVE)); in TEST()
1307 timespec ts = {}; in TEST() local
1308 ASSERT_EQ(0, timespec_get(&ts, 123)); in TEST()
1316 timespec ts = {}; in TEST() local
1317 ASSERT_EQ(TIME_UTC, timespec_getres(&ts, TIME_UTC)); in TEST()
1318 ASSERT_EQ(1, ts.tv_nsec); in TEST()
1319 ASSERT_EQ(0, ts.tv_sec); in TEST()
1327 timespec ts = {}; in TEST() local
1328 ASSERT_EQ(0, timespec_getres(&ts, 123)); in TEST()