Home
last modified time | relevance | path

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

12345678910>>...55

/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/
Ds-c.c215 time_res.tv_sec = in main()
216 time_cour.tv_sec - 1 - time_zero.tv_sec; in main()
218 time_res.tv_sec = time_cour.tv_sec - time_zero.tv_sec; in main()
223 time_sav[4].tv_sec = time_sav[5].tv_sec; in main()
225 time_sav[5].tv_sec = time_sav[6].tv_sec; in main()
227 time_sav[6].tv_sec = time_sav[7].tv_sec; in main()
229 time_sav[7].tv_sec = time_res.tv_sec; in main()
232 time_sav[sav].tv_sec = time_res.tv_sec; in main()
237 output("%4i.%06i;\n", time_res.tv_sec, time_res.tv_usec); in main()
277 output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec, in main()
[all …]
/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/
Ds-c.c216 time_res.tv_sec = in main()
217 time_cour.tv_sec - 1 - time_zero.tv_sec; in main()
219 time_res.tv_sec = time_cour.tv_sec - time_zero.tv_sec; in main()
224 time_sav[4].tv_sec = time_sav[5].tv_sec; in main()
226 time_sav[5].tv_sec = time_sav[6].tv_sec; in main()
228 time_sav[6].tv_sec = time_sav[7].tv_sec; in main()
230 time_sav[7].tv_sec = time_res.tv_sec; in main()
233 time_sav[sav].tv_sec = time_res.tv_sec; in main()
270 output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec, in main()
272 output(" %8i : %2i.%06i s\n", 1, time_sav[1].tv_sec, in main()
[all …]
/external/dhcpcd-6.8.2/
Dcommon.h62 #define timespecclear(tsp) (tsp)->tv_sec = (time_t)((tsp)->tv_nsec = 0L)
63 #define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec)
65 (((tsp)->tv_sec == (usp)->tv_sec) ? \
67 ((tsp)->tv_sec cmp (usp)->tv_sec))
70 (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \
73 (vsp)->tv_sec++; \
79 (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \
82 (vsp)->tv_sec--; \
89 ((double)(tv)->tv_sec + (double)((tv)->tv_nsec) / 1000000000.0)
92 (tv)->tv_sec++; \
[all …]
/external/curl/lib/
Dtimeval.c38 now.tv_sec = milliseconds / 1000; in curlx_tvnow()
42 now.tv_sec = (long) (milliseconds / 1000); in curlx_tvnow()
63 now.tv_sec = tsnow.tv_sec; in curlx_tvnow()
76 now.tv_sec = (long)time(NULL); in curlx_tvnow()
105 now.tv_sec = (long)time(NULL); in curlx_tvnow()
124 time_t diff = newer.tv_sec-older.tv_sec; in curlx_tvdiff()
128 return (newer.tv_sec-older.tv_sec)*1000+ in curlx_tvdiff()
139 if(newer.tv_sec != older.tv_sec) in curlx_tvdiff_secs()
140 return (double)(newer.tv_sec-older.tv_sec)+ in curlx_tvdiff_secs()
149 return t1.tv_sec; in Curl_tvlong()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/
D1-2.c128 if ((ts_th.tv_sec < ts_pre.tv_sec) || in main()
129 ((ts_th.tv_sec == ts_pre.tv_sec) && in main()
131 output("Pre : %d.%09d\n", ts_pre.tv_sec, in main()
133 output("child: %d.%09d\n", ts_th.tv_sec, in main()
135 output("Post : %d.%09d\n", ts_post.tv_sec, in main()
140 if ((ts_post.tv_sec < ts_th.tv_sec) || in main()
141 ((ts_post.tv_sec == ts_th.tv_sec) && in main()
143 output("Pre : %d.%09d\n", ts_pre.tv_sec, in main()
145 output("child: %d.%09d\n", ts_th.tv_sec, in main()
147 output("Post : %d.%09d\n", ts_post.tv_sec, in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/
D2-1.c86 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main()
89 --time_diff.tv_sec; in main()
92 if (time_diff.tv_sec < TIMEOUT) { in main()
98 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main()
99 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main()
125 currsec1.tv_sec = ts.tv_sec; in f1()
131 timeout.tv_sec = currsec1.tv_sec + TIMEOUT; in f1()
136 TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec); in f1()
150 currsec2.tv_sec = ts.tv_sec; in f1()
D1-1.c83 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main()
86 --time_diff.tv_sec; in main()
89 if (time_diff.tv_sec < TIMEOUT) { in main()
95 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main()
96 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main()
118 timeout.tv_sec = currsec1.tv_sec + TIMEOUT; in f1()
123 TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec); in f1()
/external/curl/src/
Dtool_util.c48 now.tv_sec = (long)(milliseconds / 1000); in tool_tvnow()
67 now.tv_sec = tsnow.tv_sec; in tool_tvnow()
80 now.tv_sec = (long)time(NULL); in tool_tvnow()
109 now.tv_sec = (long)time(NULL); in tool_tvnow()
124 return (newer.tv_sec-older.tv_sec)*1000+ in tool_tvdiff()
135 if(newer.tv_sec != older.tv_sec) in tool_tvdiff_secs()
136 return (double)(newer.tv_sec-older.tv_sec)+ in tool_tvdiff_secs()
145 return t1.tv_sec; in tool_tvlong()
/external/curl/tests/libtest/
Dtestutil.c38 now.tv_sec = milliseconds / 1000; in tutil_tvnow()
57 now.tv_sec = tsnow.tv_sec; in tutil_tvnow()
70 now.tv_sec = (long)time(NULL); in tutil_tvnow()
99 now.tv_sec = (long)time(NULL); in tutil_tvnow()
114 return (newer.tv_sec-older.tv_sec)*1000+ in tutil_tvdiff()
125 if(newer.tv_sec != older.tv_sec) in tutil_tvdiff_secs()
126 return (double)(newer.tv_sec-older.tv_sec)+ in tutil_tvdiff_secs()
135 return t1.tv_sec; in tutil_tvlong()
/external/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()
D7-1.c57 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()
104 tsreset.tv_sec += SMALLTIME; in main()
/external/ltp/include/
Dtst_timer.h42 return t.tv_sec * 1000000 + (t.tv_nsec + 500) / 1000; in tst_timespec_to_us()
50 return t.tv_sec * 1000 + (t.tv_nsec + 500000) / 1000000; in tst_timespec_to_ms()
60 ret.tv_sec = ms / 1000; in tst_ms_to_timeval()
73 ret.tv_sec = us / 1000000; in tst_us_to_timeval()
84 if (t1.tv_sec == t2.tv_sec) in tst_timespec_lt()
87 return t1.tv_sec < t2.tv_sec; in tst_timespec_lt()
96 t.tv_sec += us / 1000000; in tst_timespec_add_us()
100 t.tv_sec++; in tst_timespec_add_us()
115 res.tv_sec = t1.tv_sec - t2.tv_sec; in tst_timespec_diff()
118 res.tv_sec--; in tst_timespec_diff()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/
D3-1.c54 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()
D4-1.c70 if ((ts1.tv_sec <= ts2.tv_sec) && in main()
71 (ts2.tv_sec <= ts3.tv_sec) && (ts3.tv_sec <= ts4.tv_sec)) { in main()
77 ts1.tv_sec, ts2.tv_sec, ts3.tv_sec, ts4.tv_sec); in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/
D1-4.c49 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, expectedleft); in main()
109 printf("%d !~= %d\n", (int)itsget.it_value.tv_sec, in main()
[all …]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/
D3-1.c68 currsec1.tv_sec = ts.tv_sec; in fn_wr()
74 timeout.tv_sec = currsec1.tv_sec + TIMEOUT; in fn_wr()
102 currsec2.tv_sec = ts.tv_sec; in fn_wr()
185 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main()
188 --time_diff.tv_sec; in main()
191 if (time_diff.tv_sec < TIMEOUT) { in main()
195 TIMEOUT, (long)time_diff.tv_sec, in main()
243 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main()
246 --time_diff.tv_sec; in main()
249 if (time_diff.tv_sec < TIMEOUT) { in main()
/external/boringssl/src/ssl/
Dd1_lib.c124 if (ssl->d1->next_timeout.tv_sec == 0 && ssl->d1->next_timeout.tv_usec == 0) { in dtls1_start_timer()
132 ssl->d1->next_timeout.tv_sec += ssl->d1->timeout_duration_ms / 1000; in dtls1_start_timer()
135 ssl->d1->next_timeout.tv_sec++; in dtls1_start_timer()
146 if (ssl->d1->next_timeout.tv_sec == 0 && ssl->d1->next_timeout.tv_usec == 0) { in DTLSv1_get_timeout()
154 if (ssl->d1->next_timeout.tv_sec < timenow.tv_sec || in DTLSv1_get_timeout()
155 (ssl->d1->next_timeout.tv_sec == timenow.tv_sec && in DTLSv1_get_timeout()
164 ret.tv_sec -= timenow.tv_sec; in DTLSv1_get_timeout()
169 ret.tv_sec--; in DTLSv1_get_timeout()
174 if (ret.tv_sec == 0 && ret.tv_usec < 15000) { in DTLSv1_get_timeout()
179 if (ret.tv_sec > INT_MAX) { in DTLSv1_get_timeout()
[all …]
/external/ltp/testcases/kernel/timers/leapsec/
Dleapsec_timer.c68 if (a.tv_sec < b.tv_sec) in in_order()
70 if (a.tv_sec > b.tv_sec) in in_order()
93 now.tv_sec = tx->time.tv_sec; in adjtimex_status()
115 if (!strftime(buf, sizeof(buf), fmt, localtime(&now->tv_sec))) { in strtime()
131 target.tv_sec++; in test_hrtimer_early_expiration()
160 now.tv_sec += 86400 - now.tv_sec % 86400; in run_leapsec()
166 now.tv_sec -= SECONDS_BEFORE_LEAP; in run_leapsec()
179 while (tx.time.tv_sec < leap.tv_sec + SECONDS_AFTER_LEAP) { in run_leapsec()
191 start.tv_sec += now.tv_sec - (leap.tv_sec - SECONDS_BEFORE_LEAP); in run_leapsec()
193 start.tv_sec += start.tv_nsec / NSEC_PER_SEC; in run_leapsec()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/
D9-2.c88 its.it_interval.tv_sec = 0; in main()
97 its.it_value.tv_sec = tsbefore.tv_sec + in main()
102 its.it_value.tv_sec = tsbefore.tv_sec + in main()
109 (int)its.it_value.tv_sec, (int)its.it_value.tv_nsec); in main()
127 (int)tsafter.tv_sec, (int)tsafter.tv_nsec); in main()
128 if (tsafter.tv_sec < its.it_value.tv_sec) { in main()
130 (int)tsafter.tv_sec, (int)its.it_value.tv_sec); in main()
132 } else if (tsafter.tv_sec == its.it_value.tv_sec) { in main()
/external/compiler-rt/test/sanitizer_common/TestCases/Linux/
Dtimerfd.cc15 its.it_value.tv_sec = 0; in main()
17 its.it_interval.tv_sec = its.it_value.tv_sec; in main()
26 assert(its2.it_interval.tv_sec == its.it_interval.tv_sec); in main()
28 assert(its2.it_value.tv_sec <= its.it_value.tv_sec); in main()
34 assert(its3.it_interval.tv_sec == its.it_interval.tv_sec); in main()
36 assert(its3.it_value.tv_sec <= its.it_value.tv_sec); in main()
/external/ltp/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/
Drpc_clnt_control_dataint.c61 tvSet.tv_sec = 1000; in main()
67 if ((tvSet.tv_sec != tvGet.tv_sec) || (tvSet.tv_usec != tvGet.tv_usec)) in main()
72 (long)tvSet.tv_sec, (long)tvSet.tv_usec); in main()
74 (long)tvGet.tv_sec, (long)tvGet.tv_usec); in main()
77 tvSet.tv_sec = 4000; in main()
83 if ((tvSet.tv_sec != tvGet.tv_sec) || (tvSet.tv_usec != tvGet.tv_usec)) in main()
88 (long)tvSet.tv_sec, (long)tvSet.tv_usec); in main()
90 (long)tvGet.tv_sec, (long)tvGet.tv_usec); in main()
/external/linux-kselftest/tools/testing/selftests/timers/
Dleap-a-day.c73 if (a.tv_sec < b.tv_sec) in in_order()
75 if (a.tv_sec > b.tv_sec) in in_order()
87 ts.tv_sec++; in timespec_add()
149 if (tx.time.tv_sec < next_leap) { in sigalarm()
153 tx.time.tv_sec, in sigalarm()
162 tx.time.tv_sec, in sigalarm()
256 next_leap = ts.tv_sec; in main()
262 tv.tv_sec = next_leap - 10; in main()
265 printf("Setting time to %s", ctime(&tv.tv_sec)); in main()
310 its1.it_value.tv_sec = next_leap; in main()
[all …]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/
D3-1.c63 currsec1.tv_sec = ts.tv_sec; in fn_rd()
69 timeout.tv_sec = currsec1.tv_sec + TIMEOUT; in fn_rd()
92 currsec2.tv_sec = ts.tv_sec; in fn_rd()
180 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main()
183 --time_diff.tv_sec; in main()
186 if (time_diff.tv_sec < TIMEOUT) { in main()
191 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main()
192 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main()
/external/strace/tests-mx32/
Dclock_nanosleep.c53 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
67 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); in main()
78 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); in main()
85 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); in main()
94 (intmax_t) itv.it_interval.tv_sec, in main()
96 (intmax_t) itv.it_value.tv_sec, in main()
105 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, in main()
106 (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); in main()
111 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); in main()
113 ++req.ts.tv_sec; in main()
[all …]
/external/strace/tests-m32/
Dclock_nanosleep.c53 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
67 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); in main()
78 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); in main()
85 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); in main()
94 (intmax_t) itv.it_interval.tv_sec, in main()
96 (intmax_t) itv.it_value.tv_sec, in main()
105 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, in main()
106 (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); in main()
111 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); in main()
113 ++req.ts.tv_sec; in main()
[all …]

12345678910>>...55