/external/adhd/cras/src/common/ |
D | cras_util.h | 45 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/ |
D | tst_timer.h | 39 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/ |
D | cras_tm_unittest.cc | 62 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 …]
|
D | rate_estimator_unittest.cc | 13 .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 …]
|
D | dev_stream_unittest.cc | 564 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 …]
|
D | util_unittest.cc | 175 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/ |
D | timerfd_xettime.c | 55 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 …]
|
D | timer_xettime.c | 64 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 …]
|
D | nanosleep.c | 51 .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 …]
|
D | clock_nanosleep.c | 53 .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 …]
|
D | rt_sigtimedwait.c | 62 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/ |
D | timerfd_xettime.c | 55 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 …]
|
D | timer_xettime.c | 64 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 …]
|
D | nanosleep.c | 51 .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 …]
|
D | clock_nanosleep.c | 53 .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 …]
|
D | rt_sigtimedwait.c | 62 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/ |
D | timerfd_xettime.c | 55 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 …]
|
D | timer_xettime.c | 64 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 …]
|
D | nanosleep.c | 51 .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 …]
|
D | clock_nanosleep.c | 53 .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 …]
|
D | rt_sigtimedwait.c | 62 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/ |
D | time.cc | 33 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/ |
D | timerfd.cc | 16 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/ |
D | 9-2.c | 89 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/ |
D | 1-2.c | 129 (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()
|