Home
last modified time | relevance | path

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

123456789

/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)
66 ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
71 (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \
72 if ((vsp)->tv_nsec >= 1000000000L) { \
74 (vsp)->tv_nsec -= 1000000000L; \
80 (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \
81 if ((vsp)->tv_nsec < 0) { \
83 (vsp)->tv_nsec += 1000000000L; \
89 ((double)(tv)->tv_sec + (double)((tv)->tv_nsec) / 1000000000.0)
[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/strace/tests/
Dclock_nanosleep.c52 .ts = { .tv_nsec = 0xc0de1 }, in main()
55 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
68 (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()
80 req.ts.tv_nsec = 999999999 + 1; in main()
85 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); in main()
101 --req.ts.tv_nsec; in main()
106 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, in main()
107 (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); in main()
113 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); in main()
[all …]
Dnanosleep.c46 .ts = { .tv_nsec = 0xc0de1 }, in main()
49 .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, in main()
59 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); in main()
68 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); in main()
70 req.ts.tv_nsec = 1000000000; in main()
74 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); in main()
90 req.ts.tv_nsec = 999999999; in main()
95 (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, in main()
96 (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); in main()
Dtimerfd_xettime.c72 (intmax_t) new.its.it_interval.tv_nsec, in main()
74 (intmax_t) new.its.it_value.tv_nsec, in main()
76 (intmax_t) old.its.it_interval.tv_nsec, in main()
78 (intmax_t) old.its.it_value.tv_nsec); in main()
86 (intmax_t) old.its.it_interval.tv_nsec, in main()
88 (intmax_t) old.its.it_value.tv_nsec); in main()
Dtimer_xettime.c75 (intmax_t) new.its.it_interval.tv_nsec, in main()
77 (intmax_t) new.its.it_value.tv_nsec, in main()
79 (intmax_t) old.its.it_interval.tv_nsec, in main()
81 (intmax_t) old.its.it_value.tv_nsec); in main()
90 (intmax_t) old.its.it_interval.tv_nsec, in main()
92 (intmax_t) old.its.it_value.tv_nsec); in main()
Dutimensat.c45 printf("{%ju, %ju}", (uintmax_t) ts->tv_sec, (uintmax_t) ts->tv_nsec); in print_ts()
58 ts[0].tv_nsec = tv.tv_usec; in main()
60 ts[1].tv_nsec = tv.tv_usec + 1; in main()
73 ts[0].tv_nsec = UTIME_NOW; in main()
74 ts[1].tv_nsec = UTIME_OMIT; in main()
Dclock_xettime.c52 (intmax_t) t.ts.tv_nsec); in main()
58 (intmax_t) t.ts.tv_nsec); in main()
61 t.ts.tv_nsec = 0xdeface2; in main()
67 (intmax_t) t.ts.tv_nsec); in main()
Drestart_syscall.c51 struct timespec req = { .tv_nsec = 222222222 }, rem; in main()
64 (intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, in main()
65 (intmax_t) rem.tv_sec, (intmax_t) rem.tv_nsec); in main()
76 (intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, &rem); in main()
Dpselect6.c59 .ts = { .tv_sec = 0xc0de1, .tv_nsec = 0xc0de2 }, in main()
102 (long long) tm_in.ts.tv_sec, (long long) tm_in.ts.tv_nsec, in main()
104 (long long) tm.ts.tv_sec, (long long) tm.ts.tv_nsec); in main()
124 tm.ts.tv_nsec = 123; in main()
138 tm.ts.tv_nsec = 222222222; in main()
/external/autotest/client/tests/tracing_microbenchmark/src/
Dgetuid_microbench.c14 if (result->tv_nsec < time2->tv_nsec) { in ts_subtract()
16 result->tv_nsec += 1000000000L; in ts_subtract()
19 result->tv_nsec -= time2->tv_nsec; in ts_subtract()
57 per_call = (elapsed_time.tv_sec * 1000000000.0L + elapsed_time.tv_nsec) / in main()
60 elapsed_time.tv_sec, elapsed_time.tv_nsec, per_call); in main()
/external/libchrome/base/synchronization/
Dcondition_variable_posix.cc54 ts.tv_nsec = 1; in ~ConditionVariable()
81 relative_time.tv_nsec = in TimedWait()
99 absolute_time.tv_nsec = now.tv_usec * Time::kNanosecondsPerMicrosecond; in TimedWait()
104 absolute_time.tv_nsec = now.tv_nsec; in TimedWait()
108 absolute_time.tv_nsec += relative_time.tv_nsec; in TimedWait()
109 absolute_time.tv_sec += absolute_time.tv_nsec / Time::kNanosecondsPerSecond; in TimedWait()
110 absolute_time.tv_nsec %= Time::kNanosecondsPerSecond; in TimedWait()
/external/toybox/toys/posix/
Dtouch.c44 ts[0].tv_nsec = UTIME_NOW;
65 ts->tv_nsec = 0;
67 sscanf(s, ".%lu%n", &ts->tv_nsec, &len);
83 ts->tv_nsec = 0;
85 sscanf(s += len, "%lu%n", &ts->tv_nsec, &len);
91 if (ts->tv_nsec > 999999999) s = 0;
92 else while (len++ < 10) ts->tv_nsec *= 10;
113 if (i && i!=(FLAG_a|FLAG_m)) ts[i==FLAG_m].tv_nsec = UTIME_OMIT;
/external/v8/src/base/platform/
Dtime.cc104 DCHECK_GE(ts.tv_nsec, 0); in FromMachTimespec()
105 DCHECK_LT(ts.tv_nsec, in FromMachTimespec()
108 ts.tv_nsec / Time::kNanosecondsPerMicrosecond); in FromMachTimespec()
116 ts.tv_nsec = (delta_ % Time::kMicrosecondsPerSecond) * in ToMachTimespec()
127 DCHECK_GE(ts.tv_nsec, 0); in FromTimespec()
128 DCHECK_LT(ts.tv_nsec, in FromTimespec()
131 ts.tv_nsec / Time::kNanosecondsPerMicrosecond); in FromTimespec()
138 ts.tv_nsec = (delta_ % Time::kMicrosecondsPerSecond) * in ToTimespec()
270 DCHECK(ts.tv_nsec >= 0); in FromTimespec()
271 DCHECK(ts.tv_nsec < static_cast<long>(kNanosecondsPerSecond)); // NOLINT in FromTimespec()
[all …]
/external/autotest/client/tests/cyclictest/src/
Dcyclictest.c169 while (ts->tv_nsec >= NSEC_PER_SEC) { in tsnorm()
170 ts->tv_nsec -= NSEC_PER_SEC; in tsnorm()
179 diff += ((int) t1.tv_nsec - (int) t2.tv_nsec) / 1000; in calcdiff()
212 interval.tv_nsec = (par->interval % USEC_PER_SEC) * 1000; in timerthread()
256 tspec.it_value.tv_nsec = 0; in timerthread()
266 itimer.it_interval.tv_usec = interval.tv_nsec / 1000; in timerthread()
300 next.tv_nsec = now.tv_nsec + interval.tv_nsec; in timerthread()
309 next.tv_nsec = now.tv_nsec + interval.tv_nsec; in timerthread()
337 next.tv_nsec += interval.tv_nsec; in timerthread()
489 return (ts.tv_sec != 0 || ts.tv_nsec != 1); in check_timer()
/external/webrtc/webrtc/system_wrappers/source/
Devent_timer_posix.cc92 end_at.tv_nsec += (timeout - (timeout / 1000) * 1000) * E6; in Wait()
94 if (end_at.tv_nsec >= E9) { in Wait()
96 end_at.tv_nsec -= E9; in Wait()
194 end_at.tv_nsec = created_at_.tv_nsec + (time - (time / 1000) * 1000) * E6; in Process()
196 if (end_at.tv_nsec >= E9) { in Process()
198 end_at.tv_nsec -= E9; in Process()
Dcondition_variable_posix.cc103 ts.tv_nsec = tv.tv_usec * MICROSECONDS_PER_MILLISECOND; in SleepCS()
107 ts.tv_nsec += in SleepCS()
112 if (ts.tv_nsec >= NANOSECONDS_PER_SECOND) { in SleepCS()
113 ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND; in SleepCS()
114 ts.tv_nsec %= NANOSECONDS_PER_SECOND; in SleepCS()
/external/vulkan-validation-layers/demos/smoke/
DShellAndroid.cpp57 if (now.tv_nsec > start_.tv_nsec) { in get()
58 ns = now.tv_nsec - start_.tv_nsec; in get()
62 ns = one_s_in_ns - (start_.tv_nsec - now.tv_nsec); in get()
DShellXcb.cpp56 if (now.tv_nsec > start_.tv_nsec) { in get()
57 ns = now.tv_nsec - start_.tv_nsec; in get()
61 ns = one_s_in_ns - (start_.tv_nsec - now.tv_nsec); in get()
/external/webrtc/webrtc/base/
Devent.cc94 ts.tv_nsec = (milliseconds % 1000) * 1000000;
100 ts.tv_nsec = tv.tv_usec * 1000 + (milliseconds % 1000) * 1000000;
103 if (ts.tv_nsec >= 1000000000) {
105 ts.tv_nsec -= 1000000000;
/external/tlsdate/src/compat/
Dclock.h63 #define CLOCK_MSEC(time) ((time)->tp.tv_nsec / 1000000)
64 #define CLOCK_USEC(time) ((time)->tp.tv_nsec / 1000)
65 #define CLOCK_NSEC(time) ((time)->tp.tv_nsec)
Dclock-darwin.c67 time->tp.tv_nsec = mts.tv_nsec; in clock_get_real_time()
109 time->tp.tv_nsec = nsec; in clock_init_time()
/external/libnfc-nci/halimpl/bcm2079x/adaptation/
DCondVar.cpp114 long ns = absoluteTime.tv_nsec + ((millisec % 1000) * 1000000); in wait()
118 absoluteTime.tv_nsec = ns - 1000000000; in wait()
121 absoluteTime.tv_nsec = ns; in wait()
/external/fio/os/
Dos-mac.h80 tv.it_interval.tv_usec = value->it_interval.tv_nsec / 1000; in timer_settime()
83 tv.it_value.tv_usec = value->it_value.tv_nsec / 1000; in timer_settime()
96 ovalue->it_interval.tv_nsec = tv_out.it_interval.tv_usec * 1000; in timer_settime()
98 ovalue->it_value.tv_nsec = tv_out.it_value.tv_usec * 1000; in timer_settime()
/external/deqp/framework/delibs/deutil/
DdeTimer.c225 tspec.it_value.tv_nsec = (milliseconds % 1000) * 1000; in deTimer_scheduleSingle()
227 tspec.it_interval.tv_nsec = 0; in deTimer_scheduleSingle()
246 tspec.it_value.tv_nsec = (milliseconds % 1000) * 1000; in deTimer_scheduleInterval()
248 tspec.it_interval.tv_nsec = tspec.it_value.tv_nsec; in deTimer_scheduleInterval()
264 tspec.it_value.tv_nsec = 0; in deTimer_disable()
266 tspec.it_interval.tv_nsec = 0; in deTimer_disable()

123456789