/third_party/mesa3d/include/android_stub/log/ |
H A D | log_time.h | 27 #define LOG_TIME_SEC(t) ((t)->tv_sec) 37 uint32_t tv_sec = 0; /* good to Feb 5 2106 */ member 44 : tv_sec(static_cast<uint32_t>(T.tv_sec)), tv_nsec(static_cast<uint32_t>(T.tv_nsec)) {} in log_time() 46 : tv_sec(sec), tv_nsec(nsec) { in log_time() 52 tv_sec = static_cast<uint32_t>(T.tv_sec); in log_time() 58 return (tv_sec == static_cast<uint32_t>(T.tv_sec)) && in operator ==() 65 return (tv_sec < static_cas in operator <() 158 uint32_t tv_sec; global() member [all...] |
/third_party/mesa3d/src/util/tests/ |
H A D | timespec_test.cpp | 37 a.tv_sec = 1; in TEST() 39 b.tv_sec = 1; in TEST() 42 EXPECT_EQ(r.tv_sec, 3); in TEST() 50 a.tv_sec = 1; in TEST() 52 b.tv_sec = 0; in TEST() 55 EXPECT_EQ(r.tv_sec, 0); in TEST() 63 a.tv_sec = 4; in TEST() 72 a.tv_sec = 4; in TEST() 81 a.tv_sec = 4; in TEST() 93 a.tv_sec in TEST() [all...] |
/third_party/mesa3d/src/util/ |
H A D | timespec.h | 55 r->tv_sec = a->tv_sec + b->tv_sec; in timespec_add() 58 r->tv_sec++; in timespec_add() 74 r->tv_sec = a->tv_sec - b->tv_sec; in timespec_sub() 77 r->tv_sec--; in timespec_sub() 100 ((uint64_t)a->tv_sec > (uint64_t)TIME_T_MAX - b_sec); in timespec_add_nsec() 102 r->tv_sec in timespec_add_nsec() [all...] |
/third_party/alsa-lib/test/ |
H A D | queue_timer.c | 8 if (tv->tv_sec == 0) { in normalize() 9 while (tv->tv_usec <= -1000000) { tv->tv_usec += 1000000; --tv->tv_sec; } in normalize() 10 while (tv->tv_usec >= 1000000) { tv->tv_usec -= 1000000; ++tv->tv_sec; } in normalize() 11 } else if (tv->tv_sec < 0) { in normalize() 12 while (tv->tv_usec <= -1000000) { tv->tv_usec += 1000000; --tv->tv_sec; } in normalize() 13 while (tv->tv_usec > 0) { tv->tv_usec -= 1000000; ++tv->tv_sec; } in normalize() 15 while (tv->tv_usec >= 1000000) { tv->tv_usec -= 1000000; ++tv->tv_sec; } in normalize() 16 while (tv->tv_usec < 0) { tv->tv_usec += 1000000; --tv->tv_sec; } in normalize() 72 prevdiff.tv_sec = 0; in main() 89 tv.tv_sec in main() [all...] |
/third_party/curl/lib/ |
H A D | timediff.c | 46 timediff_t tv_sec = ms / 1000; in curlx_mstotv() local 50 /* tv_sec overflow check in case time_t is signed */ in curlx_mstotv() 51 if(tv_sec > TIME_T_MAX) in curlx_mstotv() 52 tv_sec = TIME_T_MAX; in curlx_mstotv() 54 tv->tv_sec = (time_t)tv_sec; in curlx_mstotv() 58 /* tv_sec overflow check on Windows there we know it is long */ in curlx_mstotv() 59 if(tv_sec > LONG_MAX) in curlx_mstotv() 60 tv_sec = LONG_MAX; in curlx_mstotv() 62 tv->tv_sec in curlx_mstotv() [all...] |
H A D | timeval.c | 39 now.tv_sec = (time_t)(count.QuadPart / Curl_freq.QuadPart); in Curl_now() 54 now.tv_sec = milliseconds / 1000; in Curl_now() 97 cnow.tv_sec = tsnow.tv_sec; in Curl_now() 109 cnow.tv_sec = tsnow.tv_sec; in Curl_now() 120 cnow.tv_sec = now.tv_sec; in Curl_now() 125 cnow.tv_sec = time(NULL); in Curl_now() 157 cnow.tv_sec in Curl_now() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/ |
H A D | s-c.c | 209 time_res.tv_sec = in main() 210 time_cour.tv_sec - 1 - time_zero.tv_sec; in main() 212 time_res.tv_sec = time_cour.tv_sec - time_zero.tv_sec; in main() 217 time_sav[4].tv_sec = time_sav[5].tv_sec; in main() 219 time_sav[5].tv_sec = time_sav[6].tv_sec; in main() [all...] |
/third_party/musl/porting/liteos_m_iccarm/kernel/include/sys/ |
H A D | time.h | 36 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 37 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 38 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 40 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 42 ((a)->tv_usec -= 1000000, (a)->tv_sec [all...] |
/third_party/musl/porting/uniproton/kernel/include/sys/ |
H A D | time.h | 36 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 37 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 38 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 40 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 42 ((a)->tv_usec -= 1000000, (a)->tv_sec [all...] |
/third_party/musl/porting/liteos_a/kernel/include/sys/ |
H A D | time.h | 63 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 64 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 65 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 66 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 67 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 69 ((a)->tv_usec -= 1000000, (a)->tv_sec [all...] |
/third_party/musl/porting/liteos_m/kernel/include/sys/ |
H A D | time.h | 36 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 37 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 38 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 40 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 42 ((a)->tv_usec -= 1000000, (a)->tv_sec [all...] |
/third_party/musl/include/sys/ |
H A D | time.h | 36 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 37 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 38 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 40 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 42 ((a)->tv_usec -= 1000000, (a)->tv_sec [all...] |
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/ |
H A D | s-c.c | 211 time_res.tv_sec = in main() 212 time_cour.tv_sec - 1 - time_zero.tv_sec; in main() 214 time_res.tv_sec = time_cour.tv_sec - time_zero.tv_sec; in main() 219 time_sav[4].tv_sec = time_sav[5].tv_sec; in main() 221 time_sav[5].tv_sec = time_sav[6].tv_sec; in main() [all...] |
/third_party/pulseaudio/src/pulse/ |
H A D | timeval.c | 61 tv->tv_sec = (time_t) (t / PA_USEC_PER_SEC); in pa_gettimeofday() 88 r = ((pa_usec_t) a->tv_sec - (pa_usec_t) b->tv_sec) * PA_USEC_PER_SEC; in pa_timeval_diff() 103 if (a->tv_sec < b->tv_sec) in pa_timeval_cmp() 106 if (a->tv_sec > b->tv_sec) in pa_timeval_cmp() 131 if (PA_UNLIKELY(tv->tv_sec > PA_INT_TYPE_MAX(time_t) - secs)) in pa_timeval_add() 134 tv->tv_sec += secs; in pa_timeval_add() 141 if (PA_UNLIKELY(tv->tv_sec > in pa_timeval_add() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/ |
H A D | 2-1.c | 85 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main() 88 --time_diff.tv_sec; in main() 91 if (time_diff.tv_sec < TIMEOUT) { in main() 97 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main() 98 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main() 124 currsec1.tv_sec = ts.tv_sec; in f1() 130 timeout.tv_sec in f1() [all...] |
/third_party/musl/libc-test/src/functional/ |
H A D | utime64.c | 34 TESTVAL(st.st_atim.tv_sec,==,0); in main() 36 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 39 TEST(__futimens_time64(fd, ((struct timespec[2]){{.tv_sec=1,.tv_nsec=UTIME_OMIT},{.tv_sec=1,.tv_nsec=UTIME_OMIT}})) == 0, "\n"); in main() 41 TESTVAL(st.st_atim.tv_sec,==,0); in main() 43 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 50 TESTVAL(st.st_atim.tv_sec,>=,t); in main() 51 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 57 TESTVAL(st.st_atim.tv_sec,==,0); in main() 58 TESTVAL(st.st_mtim.tv_sec,> in main() [all...] |
H A D | utime.c | 31 TESTVAL(st.st_atim.tv_sec,==,0); in main() 33 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 36 TEST(futimens(fd, ((struct timespec[2]){{.tv_sec=1,.tv_nsec=UTIME_OMIT},{.tv_sec=1,.tv_nsec=UTIME_OMIT}})) == 0, "\n"); in main() 38 TESTVAL(st.st_atim.tv_sec,==,0); in main() 40 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 47 TESTVAL(st.st_atim.tv_sec,>=,t); in main() 48 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 54 TESTVAL(st.st_atim.tv_sec,==,0); in main() 55 TESTVAL(st.st_mtim.tv_sec,> in main() [all...] |
/third_party/node/deps/cares/src/lib/ |
H A D | ares_timeout.c | 44 if (tout->tv_sec < now->tv_sec || in ares__timeval_remaining() 45 (tout->tv_sec == now->tv_sec && tout->tv_usec < now->tv_usec)) { in ares__timeval_remaining() 49 remaining->tv_sec = tout->tv_sec - now->tv_sec; in ares__timeval_remaining() 51 remaining->tv_sec -= 1; in ares__timeval_remaining() 85 if (tvbuf->tv_sec > maxtv->tv_sec) { in ares_timeout() [all...] |
/third_party/rust/crates/rustix/tests/time/ |
H A D | monotonic.rs | 11 if b.tv_sec == a.tv_sec { in test_monotonic_clock() 14 assert!(b.tv_sec > a.tv_sec); in test_monotonic_clock() 25 tv_sec: 1, in test_monotonic_clock_with_sleep_1s() 29 assert!(b.tv_sec > a.tv_sec); in test_monotonic_clock_with_sleep_1s() 39 tv_sec: 0, in test_monotonic_clock_with_sleep_1ms() 43 assert!(b.tv_sec >= a.tv_sec); in test_monotonic_clock_with_sleep_1ms() [all...] |
H A D | y2038.rs | 22 let tv_sec: i64 = 0; in test_y2038() 23 let _ = Timespec { tv_sec, tv_nsec: 0 }; in test_y2038() 24 let _: Secs = tv_sec; in test_y2038() 31 it_interval: Timespec { tv_sec, tv_nsec: 0 }, in test_y2038() 32 it_value: Timespec { tv_sec, tv_nsec: 0 }, in test_y2038() 49 tv_sec: (1_u64 << 32) as _, in test_y2038_with_timerfd() 53 tv_sec: (1_u64 << 32) as _, in test_y2038_with_timerfd() 72 assert_eq!(set.it_interval.tv_sec, new.it_interval.tv_sec); in test_y2038_with_timerfd() 74 assert!(new.it_value.tv_sec < in test_y2038_with_timerfd() [all...] |
/third_party/ltp/testcases/kernel/syscalls/clock_gettime/ |
H A D | leapsec01.c | 45 if (!strftime(buf, sizeof(buf), fmt, localtime(&now->tv_sec))) { in strtime() 54 if (a.tv_sec < b.tv_sec) in in_order() 56 if (a.tv_sec > b.tv_sec) in in_order() 80 now.tv_sec = tx->time.tv_sec; in adjtimex_status() 103 target.tv_sec++; in test_hrtimer_early_expiration() 135 now.tv_sec += 86400 - now.tv_sec in run_leapsec() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/ |
H A D | 3-1.c | 67 currsec1.tv_sec = ts.tv_sec; in fn_wr() 73 timeout.tv_sec = currsec1.tv_sec + TIMEOUT; in fn_wr() 101 currsec2.tv_sec = ts.tv_sec; in fn_wr() 184 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main() 187 --time_diff.tv_sec; in main() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/ |
H A D | 7-1.c | 57 tsT1.tv_sec = tsT0.tv_sec + SLEEPOFFSET; in main() 71 if (tsT2.tv_sec >= tsT1.tv_sec) { in main() 72 if ((tsT2.tv_sec - tsT1.tv_sec) <= ACCEPTABLEDELTA) { in main() 76 (int)tsT2.tv_sec, (int)tsT1.tv_sec); in main() 81 (int)tsT2.tv_sec, (int)tsT1.tv_sec); in main() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/ |
H A D | 3-1.c | 54 if ((ts1.tv_sec <= ts2.tv_sec) && in main() 55 (ts2.tv_sec <= ts3.tv_sec) && (ts3.tv_sec <= ts4.tv_sec)) { in main() 61 ts1.tv_sec, ts2.tv_sec, ts3.tv_sec, ts4.tv_sec); in main() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/ |
H A D | 1-4.c | 49 itsset.it_interval.tv_sec = TIMERINTERVALSEC; in main() 51 itsset.it_value.tv_sec = TIMERVALSEC; in main() 77 if ((itsget.it_interval.tv_sec != itsset.it_interval.tv_sec) || in main() 82 (int)itsget.it_interval.tv_sec, in main() 83 (int)itsset.it_interval.tv_sec, in main() 93 expectedleft = itsset.it_interval.tv_sec - in main() 94 (SLEEPSEC - itsset.it_value.tv_sec); in main() 95 delta = expectedleft - itsget.it_value.tv_sec; in main() 99 printf("%d > %d\n", (int)itsget.it_value.tv_sec, expectedlef in main() [all...] |