Home
last modified time | relevance | path

Searched refs:tv_nsec (Results 1 – 25 of 753) sorted by relevance

12345678910>>...31

/external/adhd/cras/src/common/
Dcras_util.h45 t->tv_nsec = (uint64_t)frames * 1000000000 / rate; in cras_frames_to_time()
56 t->tv_nsec = (unsigned int)(seconds * 1000000000); in cras_frames_to_time_precise()
63 return t->tv_nsec * (uint64_t)rate / 1000000000 + rate * t->tv_sec; in cras_time_to_frames()
94 diff->tv_nsec = end->tv_nsec - beg->tv_nsec; in subtract_timespecs()
97 if (diff->tv_sec > 0 && diff->tv_nsec < 0) { in subtract_timespecs()
99 diff->tv_nsec += 1000000000L; in subtract_timespecs()
100 } else if (diff->tv_sec < 0 && diff->tv_nsec > 0) { in subtract_timespecs()
102 diff->tv_nsec -= 1000000000L; in subtract_timespecs()
110 a->tv_nsec += b->tv_nsec; in add_timespecs()
112 while (a->tv_nsec >= 1000000000L) { in add_timespecs()
[all …]
/external/ltp/include/
Dtst_timer.h39 return t.tv_sec * 1000000000 + t.tv_nsec; in tst_timespec_to_ns()
47 return t.tv_sec * 1000000 + (t.tv_nsec + 500) / 1000; in tst_timespec_to_us()
55 return t.tv_sec * 1000 + (t.tv_nsec + 500000) / 1000000; in tst_timespec_to_ms()
108 ret.tv_nsec = (ms % 1000) * 1000000; in tst_ms_to_timespec()
121 ret.tv_nsec = (us % 1000000) * 1000; in tst_us_to_timespec()
132 return t1.tv_nsec < t2.tv_nsec; in tst_timespec_lt()
144 t.tv_nsec += (us % 1000000) * 1000; in tst_timespec_add_us()
146 if (t.tv_nsec >= 1000000000) { in tst_timespec_add_us()
148 t.tv_nsec -= 1000000000; in tst_timespec_add_us()
164 if (t1.tv_nsec < t2.tv_nsec) { in tst_timespec_diff()
[all …]
/external/adhd/cras/src/tests/
Dcras_tm_unittest.cc62 time_now.tv_nsec = 0; in TEST_F()
69 EXPECT_EQ(0, ts.tv_nsec); in TEST_F()
73 time_now.tv_nsec = 0; in TEST_F()
77 EXPECT_EQ(0, ts.tv_nsec); in TEST_F()
90 time_now.tv_nsec = 0; in TEST_F()
97 EXPECT_EQ(10 * 1000000, ts.tv_nsec); in TEST_F()
101 time_now.tv_nsec = 0; in TEST_F()
105 EXPECT_EQ(0, ts.tv_nsec); in TEST_F()
121 time_now.tv_nsec = 0; in TEST_F()
126 time_now.tv_nsec = t2_offset; in TEST_F()
[all …]
Drate_estimator_unittest.cc13 .tv_nsec = 10000000
20 .tv_nsec = 0 in TEST()
34 t.tv_nsec += 500000; in TEST()
36 t.tv_nsec += 1; in TEST()
49 .tv_nsec = 0 in TEST()
65 t.tv_nsec += interval_nsec[i]; in TEST()
67 t.tv_nsec += 1; in TEST()
81 .tv_nsec = 0 in TEST()
97 t.tv_nsec += interval_nsec[i]; in TEST()
99 t.tv_nsec += 1; in TEST()
[all …]
Ddev_stream_unittest.cc564 EXPECT_EQ(expected_ts_nsec, rstream_.sleep_interval_ts.tv_nsec); in TEST_F()
572 EXPECT_EQ(expected_ts_nsec, rstream_.sleep_interval_ts.tv_nsec); in TEST_F()
580 EXPECT_EQ(expected_ts_nsec, rstream_.sleep_interval_ts.tv_nsec); in TEST_F()
712 rstream_.next_cb_ts.tv_nsec = 0; in TEST_F()
717 clock_gettime_retspec.tv_nsec = 0; in TEST_F()
727 clock_gettime_retspec.tv_nsec = 500; in TEST_F()
739 clock_gettime_retspec.tv_nsec = 0; in TEST_F()
751 clock_gettime_retspec.tv_nsec = 500; in TEST_F()
759 expected_next_cb_ts.tv_nsec = 0; in TEST_F()
763 EXPECT_EQ(expected_next_cb_ts.tv_nsec, rstream_.next_cb_ts.tv_nsec); in TEST_F()
[all …]
Dutil_unittest.cc175 EXPECT_EQ(500000000, t.tv_nsec); in TEST()
179 EXPECT_EQ(0, t.tv_nsec); in TEST()
183 EXPECT_EQ(250000000, t.tv_nsec); in TEST()
187 EXPECT_EQ(999994791, t.tv_nsec); in TEST()
195 t.tv_nsec = 500000000; in TEST()
200 t.tv_nsec = 500000000; in TEST()
205 t.tv_nsec = 0; in TEST()
223 ts.tv_nsec = 500000000; in TEST()
227 ts.tv_nsec = 0; in TEST()
231 ts.tv_nsec = 2; in TEST()
[all …]
/external/strace/tests-mx32/
Dtimerfd_xettime.c55 its_new->it_interval.tv_nsec = 0xfacefeedU; in main()
57 its_new->it_value.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
64 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
66 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
70 its_new->it_interval.tv_nsec = 0xdeface2; in main()
72 its_new->it_value.tv_nsec = 0xdeface4; in main()
74 its_old->it_interval.tv_nsec = 0xdeface6; in main()
76 its_old->it_value.tv_nsec = 0xdeface8; in main()
87 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
89 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
[all …]
Dtimer_xettime.c64 its_new->it_interval.tv_nsec = 0xfacefeedU; in main()
66 its_new->it_value.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
73 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
75 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
79 its_new->it_interval.tv_nsec = 0xdeface2; in main()
81 its_new->it_value.tv_nsec = 0xdeface4; in main()
83 its_old->it_interval.tv_nsec = 0xdeface6; in main()
85 its_old->it_value.tv_nsec = 0xdeface8; in main()
97 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
99 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
[all …]
Dnanosleep.c51 .ts.tv_nsec = 0xc0de1, in main()
54 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
65 zero_extend_signed_to_ull(req.ts.tv_nsec)); in main()
74 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
76 req.ts.tv_nsec = 1000000000; in main()
80 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
83 req.ts.tv_nsec = 0xfacefeedU; in main()
87 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
90 req.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
94 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
[all …]
Dclock_nanosleep.c53 .ts.tv_nsec = 0xc0de1, in main()
56 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
71 zero_extend_signed_to_ull(req.ts.tv_nsec)); in main()
83 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
85 req.ts.tv_nsec = 999999999 + 1; in main()
91 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
94 req.ts.tv_nsec = 0xfacefeedU; in main()
100 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
103 req.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
109 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
[all …]
Drt_sigtimedwait.c62 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
70 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
77 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
95 timeout->tv_nsec = 42; in main()
109 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
116 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
119 timeout->tv_nsec = 0xfacefeedU; in main()
124 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
127 timeout->tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
132 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
[all …]
/external/strace/tests-m32/
Dtimerfd_xettime.c55 its_new->it_interval.tv_nsec = 0xfacefeedU; in main()
57 its_new->it_value.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
64 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
66 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
70 its_new->it_interval.tv_nsec = 0xdeface2; in main()
72 its_new->it_value.tv_nsec = 0xdeface4; in main()
74 its_old->it_interval.tv_nsec = 0xdeface6; in main()
76 its_old->it_value.tv_nsec = 0xdeface8; in main()
87 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
89 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
[all …]
Dtimer_xettime.c64 its_new->it_interval.tv_nsec = 0xfacefeedU; in main()
66 its_new->it_value.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
73 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
75 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
79 its_new->it_interval.tv_nsec = 0xdeface2; in main()
81 its_new->it_value.tv_nsec = 0xdeface4; in main()
83 its_old->it_interval.tv_nsec = 0xdeface6; in main()
85 its_old->it_value.tv_nsec = 0xdeface8; in main()
97 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
99 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
[all …]
Dnanosleep.c51 .ts.tv_nsec = 0xc0de1, in main()
54 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
65 zero_extend_signed_to_ull(req.ts.tv_nsec)); in main()
74 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
76 req.ts.tv_nsec = 1000000000; in main()
80 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
83 req.ts.tv_nsec = 0xfacefeedU; in main()
87 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
90 req.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
94 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
[all …]
Dclock_nanosleep.c53 .ts.tv_nsec = 0xc0de1, in main()
56 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
71 zero_extend_signed_to_ull(req.ts.tv_nsec)); in main()
83 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
85 req.ts.tv_nsec = 999999999 + 1; in main()
91 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
94 req.ts.tv_nsec = 0xfacefeedU; in main()
100 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
103 req.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
109 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
[all …]
Drt_sigtimedwait.c62 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
70 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
77 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
95 timeout->tv_nsec = 42; in main()
109 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
116 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
119 timeout->tv_nsec = 0xfacefeedU; in main()
124 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
127 timeout->tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
132 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
[all …]
/external/strace/tests/
Dtimerfd_xettime.c55 its_new->it_interval.tv_nsec = 0xfacefeedU; in main()
57 its_new->it_value.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
64 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
66 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
70 its_new->it_interval.tv_nsec = 0xdeface2; in main()
72 its_new->it_value.tv_nsec = 0xdeface4; in main()
74 its_old->it_interval.tv_nsec = 0xdeface6; in main()
76 its_old->it_value.tv_nsec = 0xdeface8; in main()
87 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
89 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
[all …]
Dtimer_xettime.c64 its_new->it_interval.tv_nsec = 0xfacefeedU; in main()
66 its_new->it_value.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
73 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
75 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
79 its_new->it_interval.tv_nsec = 0xdeface2; in main()
81 its_new->it_value.tv_nsec = 0xdeface4; in main()
83 its_old->it_interval.tv_nsec = 0xdeface6; in main()
85 its_old->it_value.tv_nsec = 0xdeface8; in main()
97 zero_extend_signed_to_ull(its_new->it_interval.tv_nsec), in main()
99 zero_extend_signed_to_ull(its_new->it_value.tv_nsec), in main()
[all …]
Dnanosleep.c51 .ts.tv_nsec = 0xc0de1, in main()
54 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
65 zero_extend_signed_to_ull(req.ts.tv_nsec)); in main()
74 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
76 req.ts.tv_nsec = 1000000000; in main()
80 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
83 req.ts.tv_nsec = 0xfacefeedU; in main()
87 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
90 req.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
94 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
[all …]
Dclock_nanosleep.c53 .ts.tv_nsec = 0xc0de1, in main()
56 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
71 zero_extend_signed_to_ull(req.ts.tv_nsec)); in main()
83 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
85 req.ts.tv_nsec = 999999999 + 1; in main()
91 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
94 req.ts.tv_nsec = 0xfacefeedU; in main()
100 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
103 req.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
109 zero_extend_signed_to_ull(req.ts.tv_nsec), &rem.ts); in main()
[all …]
Drt_sigtimedwait.c62 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
70 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
77 zero_extend_signed_to_ull(timeout->tv_nsec), in iterate()
95 timeout->tv_nsec = 42; in main()
109 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
116 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
119 timeout->tv_nsec = 0xfacefeedU; in main()
124 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
127 timeout->tv_nsec = (long) 0xbadc0dedfacefeedLL; in main()
132 zero_extend_signed_to_ull(timeout->tv_nsec), set_size); in main()
[all …]
/external/grpc-grpc/src/core/lib/gpr/
Dtime.cc33 cmp = (a.tv_nsec > b.tv_nsec) - (a.tv_nsec < b.tv_nsec); in gpr_time_cmp()
49 out.tv_nsec = 0; in gpr_time_0()
57 out.tv_nsec = 0; in gpr_inf_future()
65 out.tv_nsec = 0; in gpr_inf_past()
86 out.tv_nsec = in to_seconds_from_sub_second_time()
104 out.tv_nsec = 0; in to_seconds_from_above_second_time()
139 sum.tv_nsec = a.tv_nsec + b.tv_nsec; in gpr_time_add()
140 if (sum.tv_nsec >= GPR_NS_PER_SEC) { in gpr_time_add()
141 sum.tv_nsec -= GPR_NS_PER_SEC; in gpr_time_add()
172 diff.tv_nsec = a.tv_nsec - b.tv_nsec; in gpr_time_sub()
[all …]
/external/compiler-rt/test/sanitizer_common/TestCases/Linux/
Dtimerfd.cc16 its.it_value.tv_nsec = 1000000; in main()
18 its.it_interval.tv_nsec = its.it_value.tv_nsec; in main()
27 assert(its2.it_interval.tv_nsec == its.it_interval.tv_nsec); in main()
29 assert(its2.it_value.tv_nsec <= its.it_value.tv_nsec); in main()
35 assert(its3.it_interval.tv_nsec == its.it_interval.tv_nsec); in main()
37 assert(its3.it_value.tv_nsec <= its.it_value.tv_nsec); in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/
D9-2.c89 its.it_interval.tv_nsec = 0; in main()
96 if (tsbefore.tv_nsec + timeroffsets[i][1] < 1000000000) { in main()
99 its.it_value.tv_nsec = tsbefore.tv_nsec + in main()
104 its.it_value.tv_nsec = tsbefore.tv_nsec + 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()
133 if (tsafter.tv_nsec < its.it_value.tv_nsec) { in main()
136 (int)tsafter.tv_nsec, in main()
137 (int)its.it_value.tv_nsec); in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/
D1-2.c129 (ts_th.tv_nsec < ts_pre.tv_nsec))) { in main()
131 ts_pre.tv_nsec); in main()
133 ts_th.tv_nsec); in main()
135 ts_post.tv_nsec); in main()
141 (ts_post.tv_nsec < ts_th.tv_nsec))) { in main()
143 ts_pre.tv_nsec); in main()
145 ts_th.tv_nsec); in main()
147 ts_post.tv_nsec); in main()

12345678910>>...31