Home
last modified time | relevance | path

Searched refs:NSEC_PER_SEC (Results 1 – 25 of 44) sorted by relevance

12

/third_party/weston/tests/
Dtimespec-test.c52 ZUC_ASSERT_EQ(r.tv_nsec, NSEC_PER_SEC - 1); in ZUC_TEST()
61 ZUC_ASSERT_EQ(timespec_to_nsec(&a), (NSEC_PER_SEC * 4ULL) + 4); in ZUC_TEST()
97 a.tv_nsec = NSEC_PER_SEC - 1; in ZUC_TEST()
101 ZUC_ASSERT_EQ(NSEC_PER_SEC - 1, tv_nsec); in ZUC_TEST()
121 a.tv_nsec = NSEC_PER_SEC - 1; in ZUC_TEST()
130 timespec_add_nsec(&r, &a, (NSEC_PER_SEC * 2ULL)); in ZUC_TEST()
132 ZUC_ASSERT_EQ(NSEC_PER_SEC - 1, r.tv_nsec); in ZUC_TEST()
134 timespec_add_nsec(&r, &a, (NSEC_PER_SEC * 2ULL) + 2); in ZUC_TEST()
142 ZUC_ASSERT_EQ(r.tv_nsec, NSEC_PER_SEC - 1); in ZUC_TEST()
145 timespec_add_nsec(&r, &a, -NSEC_PER_SEC); in ZUC_TEST()
[all …]
/third_party/mesa3d/src/util/tests/timespec/
Dtimespec_test.cpp35 a.tv_nsec = NSEC_PER_SEC - 1; in TEST()
53 EXPECT_EQ(r.tv_nsec, NSEC_PER_SEC - 1); in TEST()
62 EXPECT_EQ(timespec_to_nsec(&a), (NSEC_PER_SEC * 4ULL) + 4); in TEST()
98 a.tv_nsec = NSEC_PER_SEC - 1; in TEST()
102 EXPECT_EQ(NSEC_PER_SEC - 1, tv_nsec); in TEST()
122 a.tv_nsec = NSEC_PER_SEC - 1; in TEST()
131 timespec_add_nsec(&r, &a, (NSEC_PER_SEC * 2ULL)); in TEST()
133 EXPECT_EQ(NSEC_PER_SEC - 1, r.tv_nsec); in TEST()
135 timespec_add_nsec(&r, &a, (NSEC_PER_SEC * 2ULL) + 2); in TEST()
141 timespec_add_nsec(&r, &r, NSEC_PER_SEC + 10ULL); in TEST()
[all …]
/third_party/mesa3d/src/util/
Dtimespec.h40 #define NSEC_PER_SEC 1000000000 macro
55 if (r->tv_nsec > NSEC_PER_SEC) { in timespec_add()
57 r->tv_nsec -= NSEC_PER_SEC; in timespec_add()
76 r->tv_nsec += NSEC_PER_SEC; in timespec_sub()
90 r->tv_sec = a->tv_sec + (b / NSEC_PER_SEC); in timespec_add_nsec()
91 r->tv_nsec = a->tv_nsec + (b % NSEC_PER_SEC); in timespec_add_nsec()
93 if (r->tv_nsec >= NSEC_PER_SEC) { in timespec_add_nsec()
95 r->tv_nsec -= NSEC_PER_SEC; in timespec_add_nsec()
98 r->tv_nsec += NSEC_PER_SEC; in timespec_add_nsec()
124 return (uint64_t)a->tv_sec * NSEC_PER_SEC + a->tv_nsec; in timespec_to_nsec()
[all …]
/third_party/weston/shared/
Dtimespec-util.h34 #define NSEC_PER_SEC 1000000000 macro
50 r->tv_nsec += NSEC_PER_SEC; in timespec_sub()
63 r->tv_sec = a->tv_sec + (b / NSEC_PER_SEC); in timespec_add_nsec()
64 r->tv_nsec = a->tv_nsec + (b % NSEC_PER_SEC); in timespec_add_nsec()
66 if (r->tv_nsec >= NSEC_PER_SEC) { in timespec_add_nsec()
68 r->tv_nsec -= NSEC_PER_SEC; in timespec_add_nsec()
71 r->tv_nsec += NSEC_PER_SEC; in timespec_add_nsec()
95 return (int64_t)a->tv_sec * NSEC_PER_SEC + a->tv_nsec; in timespec_to_nsec()
165 assert(a->tv_nsec >= 0 && a->tv_nsec < NSEC_PER_SEC); in timespec_to_proto()
182 a->tv_sec = b / NSEC_PER_SEC; in timespec_from_nsec()
[all …]
/third_party/flutter/engine/flutter/fml/platform/linux/
Dtimerfd.cc32 #ifndef NSEC_PER_SEC
33 #define NSEC_PER_SEC 1000000000 macro
40 spec.it_value.tv_sec = (time_t)(nano_secs / NSEC_PER_SEC); in TimerRearm()
41 spec.it_value.tv_nsec = nano_secs % NSEC_PER_SEC; in TimerRearm()
/third_party/eudev/src/shared/
Dtime-util.h42 #define NSEC_PER_SEC ((nsec_t) 1000000000ULL) macro
47 #define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
55 #define NSEC_PER_MONTH ((nsec_t) (2629800ULL*NSEC_PER_SEC))
57 #define NSEC_PER_YEAR ((nsec_t) (31557600ULL*NSEC_PER_SEC))
/third_party/mesa3d/src/vulkan/wsi/
Dwsi_common_queue.h103 #define NSEC_PER_SEC 1000000000 macro
117 uint32_t abs_nsec = now.tv_nsec + timeout % NSEC_PER_SEC; in wsi_queue_pull()
118 uint64_t abs_sec = now.tv_sec + (abs_nsec / NSEC_PER_SEC) + in wsi_queue_pull()
119 (timeout / NSEC_PER_SEC); in wsi_queue_pull()
120 abs_nsec %= NSEC_PER_SEC; in wsi_queue_pull()
/third_party/mesa3d/src/freedreno/drm/
Dmsm_priv.h139 ns = 3600ULL * NSEC_PER_SEC; /* 1 hour timeout is almost infinite */ in get_abs_timeout()
142 tv->tv_sec = t.tv_sec + ns / NSEC_PER_SEC; in get_abs_timeout()
143 tv->tv_nsec = t.tv_nsec + ns % NSEC_PER_SEC; in get_abs_timeout()
144 if (tv->tv_nsec >= NSEC_PER_SEC) { /* handle nsec overflow */ in get_abs_timeout()
145 tv->tv_nsec -= NSEC_PER_SEC; in get_abs_timeout()
/third_party/musl/libc-test/src/functionalext/common/
Dpthread_util.h39 #define NSEC_PER_SEC 1000000000 macro
66 const unsigned int nsecPerSec = NSEC_PER_SEC; in GetDelayedTimeByClockid()
77 const unsigned int nsecPerSec = NSEC_PER_SEC; in GetTimeDiff()
/third_party/mesa3d/src/etnaviv/drm/
Detnaviv_priv.h212 tv->tv_sec = t.tv_sec + ns / NSEC_PER_SEC; in get_abs_timeout()
213 tv->tv_nsec = t.tv_nsec + ns % NSEC_PER_SEC; in get_abs_timeout()
214 if (tv->tv_nsec >= NSEC_PER_SEC) { in get_abs_timeout()
215 tv->tv_nsec -= NSEC_PER_SEC; in get_abs_timeout()
/third_party/FreeBSD/sys/sys/
Dcallout.h57 #ifndef NSEC_PER_SEC
58 #define NSEC_PER_SEC 1000000000L macro
/third_party/ltp/testcases/realtime/func/sched_jitter/
Dsched_jitter.c55 #define NSEC_PER_SEC 1000000000 macro
88 first = (unsigned long long)a.tv_sec * NSEC_PER_SEC + a.tv_nsec; in ts_sub()
89 second = (unsigned long long)b.tv_sec * NSEC_PER_SEC + b.tv_nsec; in ts_sub()
/third_party/ltp/include/lapi/
Dcommon_timers.h14 #ifndef NSEC_PER_SEC
15 #define NSEC_PER_SEC (1000000000LL) macro
/third_party/ltp/testcases/kernel/syscalls/clock_gettime/
Dleapsec01.c124 const struct timespec sleeptime = { 0, NSEC_PER_SEC / 2 }; in run_leapsec()
168 start.tv_sec += start.tv_nsec / NSEC_PER_SEC; in run_leapsec()
169 start.tv_nsec = start.tv_nsec % NSEC_PER_SEC; in run_leapsec()
/third_party/libusb/libusb/os/
Dthreads_posix.c70 if (timeout.tv_nsec >= NSEC_PER_SEC) { in usbi_cond_timedwait()
71 timeout.tv_nsec -= NSEC_PER_SEC; in usbi_cond_timedwait()
/third_party/ltp/testcases/kernel/syscalls/clock_settime/
Dclock_settime02.c17 #define NSEC_PER_SEC (1000000000L) macro
56 .tv_nsec = NSEC_PER_SEC + 1,
/third_party/musl/libc-test/src/functionalext/thread/
Dpthread_cond_timedwait.c91 ts.tv_nsec = NSEC_PER_SEC; in pthread_cond_timedwait_0020()
230 const unsigned int nsecPerSec = NSEC_PER_SEC; in ClockWaitTimedwait2()
308 const unsigned int nsecPerSec = NSEC_PER_SEC; in ClockWaitTimedwait4()
377 const unsigned int nsecPerSec = NSEC_PER_SEC; in ClockWaitTimeMismatch()
404 const unsigned int nsecPerSec = NSEC_PER_SEC; in ClockWaitTimeMismatch2()
532 const unsigned int nsecPerSec = NSEC_PER_SEC; in PthreadCondMonotonicTimeWait2()
601 const long einvalNsec = NSEC_PER_SEC; in PthreadCondMonotonicTimeEinval()
/third_party/mesa3d/src/broadcom/vulkan/
Dv3dv_limits.h26 #define NSEC_PER_SEC 1000000000ull macro
/third_party/ltp/testcases/kernel/syscalls/epoll_pwait/
Depoll_pwait05.c30 {{.tv_nsec = NSEC_PER_SEC}, EINVAL, "ts.tv_nsec >= NSEC_PER_SEC"},
/third_party/ltp/testcases/kernel/syscalls/futex/
Dfutex_wake04.c59 to = tst_ts_from_ns(tv->tstype, 30 * NSEC_PER_SEC); in setup()
/third_party/gstreamer/gstplugins_bad/ext/avtp/
Dgstavtpsink.c67 #define NSEC_PER_SEC 1000000000 macro
68 #define TAI_OFFSET (37ULL * NSEC_PER_SEC)
/third_party/ltp/testcases/kernel/syscalls/timer_settime/
Dtimer_settime02.c56 {&timer, &pnew_set, &pold_set, NSEC_PER_SEC + 1, EINVAL},
/third_party/libusb/libusb/
Dlibusbi.h234 #if !defined(NSEC_PER_SEC)
235 #define NSEC_PER_SEC 1000000000L macro
254 (result)->tv_nsec += NSEC_PER_SEC; \
/third_party/mesa3d/src/gallium/drivers/crocus/
Dcrocus_fence.c292 #define NSEC_PER_SEC (1000 * USEC_PER_SEC) macro
301 return (uint64_t)current.tv_sec * NSEC_PER_SEC + current.tv_nsec; in gettime_ns()
/third_party/mesa3d/src/gallium/drivers/iris/
Diris_fence.c356 #define NSEC_PER_SEC (1000 * USEC_PER_SEC) macro
365 return (uint64_t)current.tv_sec * NSEC_PER_SEC + current.tv_nsec; in gettime_ns()

12