Home
last modified time | relevance | path

Searched refs:tv_sec (Results 1 – 25 of 1388) sorted by relevance

12345678910>>...56

/third_party/mesa3d/include/android_stub/log/
Dlog_time.h27 #define LOG_TIME_SEC(t) ((t)->tv_sec)
37 uint32_t tv_sec = 0; /* good to Feb 5 2106 */
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 tv_sec() function
52 tv_sec = static_cast<uint32_t>(T.tv_sec); in log_time()
58 return (tv_sec == static_cast<uint32_t>(T.tv_sec)) &&
65 return (tv_sec < static_cast<uint32_t>(T.tv_sec)) ||
66 ((tv_sec == static_cast<uint32_t>(T.tv_sec)) &&
73 return (tv_sec > static_cast<uint32_t>(T.tv_sec)) ||
74 ((tv_sec == static_cast<uint32_t>(T.tv_sec)) &&
[all …]
/third_party/mesa3d/src/util/tests/
Dtimespec_test.cpp37 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 = 0; in TEST()
[all …]
/third_party/mesa3d/src/util/
Dtimespec.h55 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 = (uint64_t)a->tv_sec + b_sec; in timespec_add_nsec()
106 if (r->tv_sec >= TIME_T_MAX) in timespec_add_nsec()
108 r->tv_sec = (uint64_t)r->tv_sec + 1ull; in timespec_add_nsec()
112 r->tv_sec--; in timespec_add_nsec()
142 return (uint64_t)a->tv_sec * NSEC_PER_SEC + a->tv_nsec; in timespec_to_nsec()
[all …]
/third_party/alsa-lib/test/
Dqueue_timer.c8 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 -= starttv.tv_sec; in main()
[all …]
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/
Ds-c.c209 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()
221 time_sav[6].tv_sec = time_sav[7].tv_sec; in main()
223 time_sav[7].tv_sec = time_res.tv_sec; in main()
226 time_sav[sav].tv_sec = time_res.tv_sec; in main()
231 output("%4i.%06i;\n", time_res.tv_sec, time_res.tv_usec); in main()
271 output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec, in main()
[all …]
/third_party/curl/lib/
Dtimediff.c46 timediff_t tv_sec = ms / 1000; in curlx_mstotv() local
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()
59 if(tv_sec > LONG_MAX) in curlx_mstotv()
60 tv_sec = LONG_MAX; in curlx_mstotv()
62 tv->tv_sec = (long)tv_sec; in curlx_mstotv()
67 if(tv_sec > INT_MAX) in curlx_mstotv()
68 tv_sec = INT_MAX; in curlx_mstotv()
70 tv->tv_sec = (int)tv_sec; in curlx_mstotv()
[all …]
Dtimeval.c39 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 = usecs / 1000000; in Curl_now()
175 ret.tv_sec = now.tv_sec; in Curl_now()
188 now.tv_sec = time(NULL); in Curl_now()
203 timediff_t diff = (timediff_t)newer.tv_sec-older.tv_sec; in Curl_timediff()
[all …]
/third_party/musl/porting/liteos_m_iccarm/kernel/include/sys/
Dtime.h36 #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++) )
43 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \
45 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
50 (ts)->tv_sec = (tv)->tv_sec, \
54 (tv)->tv_sec = (ts)->tv_sec, \
/third_party/musl/porting/uniproton/kernel/include/sys/
Dtime.h36 #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++) )
43 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \
45 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
50 (ts)->tv_sec = (tv)->tv_sec, \
54 (tv)->tv_sec = (ts)->tv_sec, \
/third_party/musl/porting/liteos_m/kernel/include/sys/
Dtime.h36 #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++) )
43 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \
45 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
50 (ts)->tv_sec = (tv)->tv_sec, \
54 (tv)->tv_sec = (ts)->tv_sec, \
/third_party/musl/include/sys/
Dtime.h36 #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++) )
43 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \
45 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
50 (ts)->tv_sec = (tv)->tv_sec, \
54 (tv)->tv_sec = (ts)->tv_sec, \
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/
Ds-c.c211 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()
223 time_sav[6].tv_sec = time_sav[7].tv_sec; in main()
225 time_sav[7].tv_sec = time_res.tv_sec; in main()
228 time_sav[sav].tv_sec = time_res.tv_sec; in main()
265 output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec, in main()
267 output(" %8i : %2i.%06i s\n", 1, time_sav[1].tv_sec, in main()
[all …]
/third_party/musl/porting/liteos_a/kernel/include/sys/
Dtime.h63 #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++) )
70 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \
72 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
77 (ts)->tv_sec = (tv)->tv_sec, \
81 (tv)->tv_sec = (ts)->tv_sec, \
/third_party/pulseaudio/src/pulse/
Dtimeval.c61 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 >= PA_INT_TYPE_MAX(time_t))) in pa_timeval_add()
144 tv->tv_sec++; in pa_timeval_add()
151 tv->tv_sec = PA_INT_TYPE_MAX(time_t); in pa_timeval_add()
162 if (PA_UNLIKELY(tv->tv_sec < secs)) in pa_timeval_sub()
[all …]
/third_party/musl/libc-test/src/functional/
Dutime.c31 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_… 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,>=,t); in main()
59 TESTVAL(st.st_atim.tv_sec,>=,t); in main()
[all …]
Dutime64.c34 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_ns… 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,>=,t); in main()
62 TESTVAL(st.st_atim.tv_sec,>=,t); in main()
[all …]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/
D1-2.c129 if ((ts_th.tv_sec < ts_pre.tv_sec) || in main()
130 ((ts_th.tv_sec == ts_pre.tv_sec) && in main()
132 output("Pre : %d.%09d\n", ts_pre.tv_sec, in main()
134 output("child: %d.%09d\n", ts_th.tv_sec, in main()
136 output("Post : %d.%09d\n", ts_post.tv_sec, in main()
141 if ((ts_post.tv_sec < ts_th.tv_sec) || in main()
142 ((ts_post.tv_sec == ts_th.tv_sec) && in main()
144 output("Pre : %d.%09d\n", ts_pre.tv_sec, in main()
146 output("child: %d.%09d\n", ts_th.tv_sec, in main()
148 output("Post : %d.%09d\n", ts_post.tv_sec, in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/
D2-1.c85 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 = currsec1.tv_sec + TIMEOUT; in f1()
135 TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec); in f1()
149 currsec2.tv_sec = ts.tv_sec; in f1()
/third_party/rust/crates/rustix/tests/time/
Dmonotonic.rs11 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()
44 assert!(b.tv_sec != a.tv_sec || b.tv_nsec > a.tv_nsec); in test_monotonic_clock_with_sleep_1ms()
Dtimerfd.rs12 tv_sec: 0, in test_timerfd()
16 tv_sec: 1, in test_timerfd()
30 assert_eq!(set.it_interval.tv_sec, new.it_interval.tv_sec); in test_timerfd()
32 assert!(new.it_value.tv_sec <= set.it_value.tv_sec); in test_timerfd()
34 new.it_value.tv_nsec < set.it_value.tv_nsec || new.it_value.tv_sec < set.it_value.tv_sec in test_timerfd()
46 tv_sec: 0, in test_timerfd_with_interval()
50 tv_sec: 1, in test_timerfd_with_interval()
63 assert_eq!(set.it_interval.tv_sec, new.it_interval.tv_sec); in test_timerfd_with_interval()
73 assert_eq!(set.it_interval.tv_sec, new.it_interval.tv_sec); in test_timerfd_with_interval()
/third_party/ltp/testcases/kernel/syscalls/clock_gettime/
Dleapsec01.c45 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 % 86400; in run_leapsec()
141 now.tv_sec -= SECONDS_BEFORE_LEAP; in run_leapsec()
154 while (tx.time.tv_sec < leap.tv_sec + SECONDS_AFTER_LEAP) { in run_leapsec()
166 start.tv_sec += now.tv_sec - (leap.tv_sec - SECONDS_BEFORE_LEAP); in run_leapsec()
168 start.tv_sec += start.tv_nsec / NSEC_PER_SEC; in run_leapsec()
/third_party/node/deps/cares/src/lib/
Dares_timeout.c44 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()
88 if (tvbuf->tv_sec < maxtv->tv_sec) { in ares_timeout()
/third_party/musl/src/stat/
Dfstatat.c25 int64_t tv_sec; member
54 .st_atim.tv_sec = stx.stx_atime.tv_sec, in fstatat_statx()
56 .st_mtim.tv_sec = stx.stx_mtime.tv_sec, in fstatat_statx()
58 .st_ctim.tv_sec = stx.stx_ctime.tv_sec, in fstatat_statx()
61 .__st_atim32.tv_sec = stx.stx_atime.tv_sec, in fstatat_statx()
63 .__st_mtim32.tv_sec = stx.stx_mtime.tv_sec, in fstatat_statx()
65 .__st_ctim32.tv_sec = stx.stx_ctime.tv_sec, in fstatat_statx()
115 .st_atim.tv_sec = kst.st_atime_sec, in fstatat_kstat()
117 .st_mtim.tv_sec = kst.st_mtime_sec, in fstatat_kstat()
119 .st_ctim.tv_sec = kst.st_ctime_sec, in fstatat_kstat()
[all …]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/
D3-1.c67 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()
190 if (time_diff.tv_sec < TIMEOUT) { in main()
194 TIMEOUT, (long)time_diff.tv_sec, in main()
242 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main()
245 --time_diff.tv_sec; in main()
248 if (time_diff.tv_sec < TIMEOUT) { in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/
D7-2.c51 tsT1.tv_sec = tsT0.tv_sec + SLEEPOFFSET; in main()
54 tsT2.tv_sec = tsT1.tv_sec + SMALLTIME; in main()
73 if (tsT3.tv_sec >= tsT2.tv_sec) { in main()
74 if ((tsT3.tv_sec - tsT2.tv_sec) <= ACCEPTABLEDELTA) { in main()
78 (int)tsT3.tv_sec, (int)tsT2.tv_sec); in main()
83 (int)tsT3.tv_sec, (int)tsT2.tv_sec); in main()

12345678910>>...56