Home
last modified time | relevance | path

Searched refs:tv_usec (Results 1 – 25 of 670) sorted by relevance

12345678910>>...27

/third_party/alsa-lib/test/
Dqueue_timer.c9 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()
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()
73 prevdiff.tv_usec = 0; in main()
90 tv.tv_usec -= starttv.tv_usec; in main()
94 diff.tv_usec = tv.tv_usec - rtime->tv_nsec / 1000; in main()
98 diffdiff.tv_usec = diff.tv_usec - prevdiff.tv_usec; in main()
[all …]
/third_party/pulseaudio/src/pulse/
Dtimeval.c62 tv->tv_usec = (suseconds_t) (t % PA_USEC_PER_SEC); in pa_gettimeofday()
91 if (a->tv_usec > b->tv_usec) in pa_timeval_diff()
92 r += (pa_usec_t) a->tv_usec - (pa_usec_t) b->tv_usec; in pa_timeval_diff()
93 else if (a->tv_usec < b->tv_usec) in pa_timeval_diff()
94 r -= (pa_usec_t) b->tv_usec - (pa_usec_t) a->tv_usec; in pa_timeval_diff()
109 if (a->tv_usec < b->tv_usec) in pa_timeval_cmp()
112 if (a->tv_usec > b->tv_usec) in pa_timeval_cmp()
136 tv->tv_usec += (suseconds_t) v; in pa_timeval_add()
139 while ((pa_usec_t) tv->tv_usec >= PA_USEC_PER_SEC) { in pa_timeval_add()
145 tv->tv_usec -= (suseconds_t) PA_USEC_PER_SEC; in pa_timeval_add()
[all …]
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/
Ds-c.c206 time_res.tv_usec = in main()
207 time_cour.tv_usec + 1000000 - time_zero.tv_usec; in main()
208 if (time_res.tv_usec < 1000000) { in main()
213 time_res.tv_usec -= 1000000; in main()
218 time_sav[4].tv_usec = time_sav[5].tv_usec; in main()
220 time_sav[5].tv_usec = time_sav[6].tv_usec; in main()
222 time_sav[6].tv_usec = time_sav[7].tv_usec; in main()
224 time_sav[7].tv_usec = time_res.tv_usec; in main()
227 time_sav[sav].tv_usec = time_res.tv_usec; in main()
231 output("%4i.%06i;\n", time_res.tv_sec, time_res.tv_usec); in main()
[all …]
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/
Ds-c.c208 time_res.tv_usec = in main()
209 time_cour.tv_usec + 1000000 - time_zero.tv_usec; in main()
210 if (time_res.tv_usec < 1000000) { in main()
215 time_res.tv_usec -= 1000000; in main()
220 time_sav[4].tv_usec = time_sav[5].tv_usec; in main()
222 time_sav[5].tv_usec = time_sav[6].tv_usec; in main()
224 time_sav[6].tv_usec = time_sav[7].tv_usec; in main()
226 time_sav[7].tv_usec = time_res.tv_usec; in main()
229 time_sav[sav].tv_usec = time_res.tv_usec; in main()
266 time_sav[0].tv_usec); in main()
[all …]
/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)
39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec)
41 ((a)->tv_usec = (s)->tv_usec + (t)->tv_usec) >= 1000000 && \
42 ((a)->tv_usec -= 1000000, (a)->tv_sec++) )
44 ((a)->tv_usec = (s)->tv_usec - (t)->tv_usec) < 0 && \
45 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
51 (ts)->tv_nsec = (tv)->tv_usec * 1000, \
55 (tv)->tv_usec = (ts)->tv_nsec / 1000, \
/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)
39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec)
41 ((a)->tv_usec = (s)->tv_usec + (t)->tv_usec) >= 1000000 && \
42 ((a)->tv_usec -= 1000000, (a)->tv_sec++) )
44 ((a)->tv_usec = (s)->tv_usec - (t)->tv_usec) < 0 && \
45 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
51 (ts)->tv_nsec = (tv)->tv_usec * 1000, \
55 (tv)->tv_usec = (ts)->tv_nsec / 1000, \
/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)
39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec)
41 ((a)->tv_usec = (s)->tv_usec + (t)->tv_usec) >= 1000000 && \
42 ((a)->tv_usec -= 1000000, (a)->tv_sec++) )
44 ((a)->tv_usec = (s)->tv_usec - (t)->tv_usec) < 0 && \
45 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
51 (ts)->tv_nsec = (tv)->tv_usec * 1000, \
55 (tv)->tv_usec = (ts)->tv_nsec / 1000, \
/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)
39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec)
41 ((a)->tv_usec = (s)->tv_usec + (t)->tv_usec) >= 1000000 && \
42 ((a)->tv_usec -= 1000000, (a)->tv_sec++) )
44 ((a)->tv_usec = (s)->tv_usec - (t)->tv_usec) < 0 && \
45 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
51 (ts)->tv_nsec = (tv)->tv_usec * 1000, \
55 (tv)->tv_usec = (ts)->tv_nsec / 1000, \
/third_party/musl/ndk_musl_include/sys/
Dtime.h35 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec)
36 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0)
38 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec)
40 ((a)->tv_usec = (s)->tv_usec + (t)->tv_usec) >= 1000000 && \
41 ((a)->tv_usec -= 1000000, (a)->tv_sec++) )
43 ((a)->tv_usec = (s)->tv_usec - (t)->tv_usec) < 0 && \
44 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
50 (ts)->tv_nsec = (tv)->tv_usec * 1000, \
54 (tv)->tv_usec = (ts)->tv_nsec / 1000, \
/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)
66 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec)
68 ((a)->tv_usec = (s)->tv_usec + (t)->tv_usec) >= 1000000 && \
69 ((a)->tv_usec -= 1000000, (a)->tv_sec++) )
71 ((a)->tv_usec = (s)->tv_usec - (t)->tv_usec) < 0 && \
72 ((a)->tv_usec += 1000000, (a)->tv_sec--) )
78 (ts)->tv_nsec = (tv)->tv_usec * 1000, \
82 (tv)->tv_usec = (ts)->tv_nsec / 1000, \
/third_party/mesa3d/src/gallium/frontends/xvmc/tests/
Dtestlib.c125 if (x->tv_usec < y->tv_usec) in timeval_subtract()
127 int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1; in timeval_subtract()
128 y->tv_usec -= 1000000 * nsec; in timeval_subtract()
131 if (x->tv_usec - y->tv_usec > 1000000) in timeval_subtract()
133 int nsec = (x->tv_usec - y->tv_usec) / 1000000; in timeval_subtract()
134 y->tv_usec += 1000000 * nsec; in timeval_subtract()
143 result->tv_usec = x->tv_usec - y->tv_usec; in timeval_subtract()
/third_party/ltp/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/
Drpc_clnt_control_dataint.c62 tvSet.tv_usec = 2000; 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()
78 tvSet.tv_usec = 8000; 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()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/
D2-1.c86 time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec; in main()
87 if (time_diff.tv_usec < 0) { in main()
89 time_diff.tv_usec += 1000000; in main()
97 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main()
98 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main()
125 currsec1.tv_usec = ts.tv_nsec / 1000; in f1()
131 timeout.tv_nsec = currsec1.tv_usec * 1000; in f1()
135 TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec); in f1()
150 currsec2.tv_usec = ts.tv_nsec / 1000; in f1()
D1-1.c83 time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec; in main()
84 if (time_diff.tv_usec < 0) { in main()
86 time_diff.tv_usec += 1000000; in main()
94 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main()
95 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main()
118 timeout.tv_nsec = currsec1.tv_usec * 1000; in f1()
122 TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec); in f1()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/
D3-1.c68 currsec1.tv_usec = ts.tv_nsec / 1000; in fn_wr()
74 timeout.tv_nsec = currsec1.tv_usec * 1000; in fn_wr()
102 currsec2.tv_usec = ts.tv_nsec / 1000; in fn_wr()
185 time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec; in main()
186 if (time_diff.tv_usec < 0) { in main()
188 time_diff.tv_usec += 1000000; in main()
195 (long)time_diff.tv_usec); in main()
243 time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec; in main()
244 if (time_diff.tv_usec < 0) { in main()
246 time_diff.tv_usec += 1000000; in main()
D1-1.c64 timeout.tv_nsec = currsec1.tv_usec * 1000; in fn_wr()
165 time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec; in main()
166 if (time_diff.tv_usec < 0) { in main()
168 time_diff.tv_usec += 1000000; in main()
174 (long)time_diff.tv_usec); in main()
222 time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec; in main()
223 if (time_diff.tv_usec < 0) { in main()
225 time_diff.tv_usec += 1000000; in main()
D6-1.c90 abs_timeout.tv_nsec = before_wait.tv_usec * 1000; in th_fn()
169 time_diff.tv_usec = after_wait.tv_usec - before_wait.tv_usec; in main()
170 if (time_diff.tv_usec < 0) { in main()
172 time_diff.tv_usec += 1000000; in main()
177 TIMEOUT, (long)time_diff.tv_sec, (long)time_diff.tv_usec); in main()
/third_party/musl/compat/time32/
Dsetitimer_time32.c10 .it_interval.tv_usec = new32->it_interval.tv_usec, in __setitimer_time32()
12 .it_value.tv_usec = new32->it_value.tv_usec}), &old); in __setitimer_time32()
20 old32->it_interval.tv_usec = old.it_interval.tv_usec; in __setitimer_time32()
22 old32->it_value.tv_usec = old.it_value.tv_usec; in __setitimer_time32()
/third_party/ltp/testcases/kernel/syscalls/getrusage/
Dgetrusage04.c108 usage.ru_utime.tv_usec, usage.ru_stime.tv_usec); in main()
109 ulast = usage.ru_utime.tv_usec; in main()
110 slast = usage.ru_stime.tv_usec; in main()
114 udelta = usage.ru_utime.tv_usec - ulast; in main()
115 sdelta = usage.ru_stime.tv_usec - slast; in main()
119 usage.ru_utime.tv_usec, in main()
120 usage.ru_stime.tv_usec); in main()
136 ulast = usage.ru_utime.tv_usec; in main()
137 slast = usage.ru_stime.tv_usec; in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/
D3-1.c63 currsec1.tv_usec = ts.tv_nsec / 1000; in fn_rd()
69 timeout.tv_nsec = currsec1.tv_usec * 1000; in fn_rd()
92 currsec2.tv_usec = ts.tv_nsec / 1000; in fn_rd()
180 time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec; in main()
181 if (time_diff.tv_usec < 0) { in main()
183 time_diff.tv_usec += 1000000; in main()
190 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main()
191 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main()
D1-1.c61 timeout.tv_nsec = currsec1.tv_usec * 1000; in fn_rd()
166 time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec; in main()
167 if (time_diff.tv_usec < 0) { in main()
169 time_diff.tv_usec += 1000000; in main()
174 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main()
175 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main()
D6-1.c90 abs_timeout.tv_nsec = before_wait.tv_usec * 1000; in th_fn()
169 wait_time.tv_usec = after_wait.tv_usec - before_wait.tv_usec; in main()
170 if (wait_time.tv_usec < 0) { in main()
172 wait_time.tv_usec += 1000000; in main()
178 (long int)wait_time.tv_usec); in main()
/third_party/ltp/testcases/kernel/syscalls/settimeofday/
Dsettimeofday01.c28 tv1.tv_usec += VAL_MSEC; in verify_settimeofday()
29 if (tv1.tv_usec >= USEC_PER_SEC) in verify_settimeofday()
30 tv1.tv_usec = VAL_MSEC; in verify_settimeofday()
44 (tv2.tv_usec - tv1.tv_usec) / 1000; in verify_settimeofday()
48 (tv1.tv_usec - tv2.tv_usec) / 1000; in verify_settimeofday()
/third_party/toybox/toys/posix/
Dtime.c41 if (tv.tv_usec > tv2.tv_usec) { in time_main()
42 tv2.tv_usec += 1000000; in time_main()
45 r = (tv2.tv_sec-tv.tv_sec)+((tv2.tv_usec-tv.tv_usec)/1000000.0); in time_main()
46 u = ru.ru_utime.tv_sec+(ru.ru_utime.tv_usec/1000000.0); in time_main()
47 s = ru.ru_stime.tv_sec+(ru.ru_stime.tv_usec/1000000.0); in time_main()
/third_party/node/deps/cares/src/lib/
Dares__timeval.c31 now.tv_usec = (milliseconds % 1000) * 1000; in ares__tvnow()
50 now.tv_usec = tsnow.tv_nsec / 1000; in ares__tvnow()
63 now.tv_usec = 0; in ares__tvnow()
92 now.tv_usec = 0; in ares__tvnow()
108 (newer.tv_usec-older.tv_usec)/1000;

12345678910>>...27