Searched refs:now (Results 1 - 25 of 69) sorted by relevance

123

/fuchsia/zircon/system/ulib/zircon/
H A Dzx_deadline_after.cpp11 zx_time_t now = VDSO_zx_clock_get_monotonic(); local
12 return zx_time_add_duration(now, nanoseconds);
/fuchsia/zircon/third_party/ulib/musl/src/time/
H A Dclock_gettime.c28 zx_time_t now; local
29 zx_status_t status = _zx_clock_get_new(zx_clock, &now);
33 ts->tv_sec = now / ZX_SEC(1);
34 ts->tv_nsec = now % ZX_SEC(1);
/fuchsia/zircon/kernel/include/platform/
H A Dtimer.h16 typedef void(*platform_timer_callback)(zx_time_t now);
29 void timer_tick(zx_time_t now);
/fuchsia/zircon/kernel/tests/
H A Dsleep_tests.cpp19 zx_time_t now = current_time(); local
21 zx_duration_t actual_delay = current_time() - now;
H A Dtimer_tests.cpp28 static void timer_diag_cb(timer_t* timer, zx_time_t now, void* arg) { argument
77 static void timer_diag_cb2(timer_t* timer, zx_time_t now, void* arg) { argument
213 static void timer_stress_cb(struct timer* t, zx_time_t now, void* void_arg) { argument
239 // We're now running on something other than timer_cpu.
308 static void timer_cb(struct timer*, zx_time_t now, void* void_arg) { argument
336 static void timer_cancel_cb(struct timer* t, zx_time_t now, void* void_arg) { argument
356 static void timer_set_cb(struct timer* t, zx_time_t now, void* void_arg) { argument
379 static void timer_trylock_cb(struct timer* t, zx_time_t now, void* void_arg) { argument
428 // Callback should now be running. Tell it to stop waiting and start trylocking.
475 // Callback should now b
[all...]
/fuchsia/zircon/system/utest/fs/
H A Dtest-attr.c31 zx_time_t now = zx_clock_get(ZX_CLOCK_UTC); local
32 ASSERT_NE(now, 0u, "zx_clock_get only returns zero on error");
39 ts[1].tv_sec = (long)(now / ZX_SEC(1));
40 ts[1].tv_nsec = (long)(now % ZX_SEC(1));
42 // make sure we get back "now" from stat()
46 now = ROUND_DOWN(now, test_info->nsec_granularity);
47 ASSERT_EQ(statb1.st_mtim.tv_sec, (long)(now / ZX_SEC(1)), "");
48 ASSERT_EQ(statb1.st_mtim.tv_nsec, (long)(now % ZX_SEC(1)), "");
102 zx_time_t now local
114 ASSERT_GT(nstimespec(statb.st_ctim), now, ""); local
115 ASSERT_GT(nstimespec(statb.st_mtim), now, ""); local
126 ASSERT_GT(nstimespec(statb.st_mtim), now, ""); local
129 ASSERT_GT(nstimespec(statb.st_mtim), now, ""); local
137 ASSERT_EQ(nstimespec(statb.st_mtim), now, ""); local
140 ASSERT_GT(nstimespec(statb.st_mtim), now, ""); local
148 ASSERT_GT(nstimespec(statb.st_mtim), now, ""); local
156 ASSERT_GT(nstimespec(statb.st_mtim), now, ""); local
158 ASSERT_GT(nstimespec(statb.st_mtim), now, ""); local
[all...]
/fuchsia/zircon/system/ulib/fs/include/fs/
H A Dticker.h30 : ticks_(collecting_metrics ? zx::ticks::now() : zx::ticks()) {}
36 ticks_ = zx::ticks::now();
48 return zx::ticks::now() - ticks_;
/fuchsia/zircon/system/ulib/unittest/
H A Dwatchdog.cpp145 struct timespec now; local
146 clock_gettime(CLOCK_REALTIME, &now);
147 uint64_t now_nanos = timespec_to_nanoseconds(&now);
195 struct timespec now; local
196 clock_gettime(CLOCK_REALTIME, &now);
197 test_start_time = timespec_to_nanoseconds(&now);
/fuchsia/zircon/system/uapp/trace-example/
H A Dmain.cpp33 zx::time now = async::Now(loop.dispatcher());
34 if (now > quit_time) {
40 task.PostForTime(loop.dispatcher(), now + zx::msec(200));
/fuchsia/zircon/system/core/netsvc/
H A Dnetsvc.c102 zx_time_t now = zx_clock_get_monotonic(); local
106 netifc_set_timer((next_timeout < now) ? 0 :
107 (zx_time_sub_time(next_timeout, now)) / ZX_MSEC(1));
191 zx_time_t now = zx_clock_get_monotonic(); local
192 if (now > debuglog_next_timeout) {
195 if (now > tftp_next_timeout) {
/fuchsia/zircon/system/ulib/intel-hda/utils/
H A Dutils.cpp21 zx_time_t now = zx_clock_get_monotonic(); local
22 zx_time_t deadline = zx_time_add_duration(now, timeout);
25 now = zx_clock_get_monotonic();
26 if (now >= deadline)
29 zx_duration_t sleep_time = zx_time_sub_time(deadline, now);
/fuchsia/zircon/system/utest/core/c11-mutex/
H A Dmutex.c20 zx_time_t now = zx_clock_get(ZX_CLOCK_UTC); local
22 now / 1000000000, now % 1000000000, str);
210 zx_time_t now = zx_clock_get(ZX_CLOCK_UTC); local
212 .tv_sec = now / ZX_SEC(1),
213 .tv_nsec = now % ZX_SEC(1),
222 zx_duration_t elapsed = zx_time_sub_time(zx_clock_get(ZX_CLOCK_UTC), now);
/fuchsia/zircon/kernel/kernel/
H A Dtimer.cpp346 void timer_tick(zx_time_t now) { argument
355 LTRACEF("cpu %u now %" PRIi64 ", sp %p\n", cpu, now, __GET_FRAME());
361 if (now >= percpu[cpu].preempt_timer_deadline) {
363 sched_preempt_timer_tick(now);
374 LTRACEF("next item on timer queue %p at %" PRIi64 " now %" PRIi64 " (%p, arg %p)\n",
375 timer, timer->scheduled_time, now, timer->callback, timer->arg);
376 if (likely(now < timer->scheduled_time)) {
394 [timer, now]() {
400 timer->callback(timer, now, time
506 zx_time_t now = current_time(); local
[all...]
H A Dsched.cpp222 // mark the cpu as busy since the run queue now has at least one item in it
232 // mark the cpu as busy since the run queue now has at least one item in it
550 // if the affinity mask does not include the current cpu, migrate us right now
636 // we may now be higher priority than the current thread on this cpu, reschedule
735 void sched_preempt_timer_tick(zx_time_t now) { argument
746 DEBUG_ASSERT(now > current_thread->last_started_running);
747 zx_duration_t delta = zx_time_sub_time(now, current_thread->last_started_running);
752 // set a timer to go off on the time slice interval from now
753 timer_preempt_reset(zx_time_add_duration(now, THREAD_INITIAL_TIME_SLICE));
767 // after set_current_thread (we'd now se
812 zx_time_t now = current_time(); local
[all...]
/fuchsia/zircon/kernel/include/kernel/
H A Dsched.h47 void sched_preempt_timer_tick(zx_time_t now);
H A Dtimer.h21 typedef void (*timer_callback)(struct timer*, zx_time_t now, void* arg);
82 // void callback(timer_t *, zx_time_t now, void *arg) { ... }
/fuchsia/zircon/system/utest/bad-kernel-access/
H A Drules.mk5 # disabled for now
/fuchsia/zircon/system/utest/core/zxr-mutex/
H A Dmutex.c18 zx_time_t now = zx_clock_get_monotonic(); local
20 now / 1000000000, now % 1000000000, str);
/fuchsia/zircon/third_party/ulib/musl/src/misc/
H A Dsyslog.c74 time_t now; local
89 now = time(NULL);
90 gmtime_r(&now, &tm);
/fuchsia/zircon/kernel/lib/watchdog/
H A Dwatchdog.c32 static void watchdog_timer_callback(timer_t *timer, zx_time_t now, void *arg) argument
98 static void hw_watchdog_timer_callback(timer_t *timer, zx_time_t now, void *arg) argument
/fuchsia/zircon/system/uapp/loadgen/
H A Dloadgen.cpp119 zx_time_t now = zx_clock_get_monotonic(); local
121 if (now >= sleep_deadline)
124 if (zx_time_sub_time(sleep_deadline, now) > max_sleep) {
125 zx_nanosleep(zx_time_add_duration(now, max_sleep));
/fuchsia/zircon/system/uapp/psutils/
H A Dkstats.c255 struct timespec now; local
256 timespec_get(&now, TIME_UTC);
258 gmtime_r(&now.tv_sec, &nowtm);
261 printf("\n--- %s.%03ldZ ---\n", tbuf, now.tv_nsec / (1000 * 1000));
/fuchsia/zircon/system/ulib/async/include/lib/async/
H A Ddispatcher.h48 // - Timing: |now|
86 zx_time_t (*now)(async_dispatcher_t* dispatcher); member in struct:async_ops::v1
/fuchsia/zircon/system/utest/async/
H A Dtask_tests.cpp19 zx::time Now() override { return now; }
33 zx::time now{42};
166 EXPECT_EQ(dispatcher.now.get(), dispatcher.last_task->deadline);
167 EXPECT_EQ(dispatcher.now.get(), harness.task().last_deadline().get());
184 EXPECT_EQ(dispatcher.now.get(), dispatcher.last_task->deadline);
185 EXPECT_EQ(dispatcher.now.get(), harness.task().last_deadline().get());
205 EXPECT_EQ(dispatcher.now.get() + 5, dispatcher.last_task->deadline);
206 EXPECT_EQ(dispatcher.now.get() + 5, harness.task().last_deadline().get());
223 EXPECT_EQ(dispatcher.now.get() + 6, dispatcher.last_task->deadline);
224 EXPECT_EQ(dispatcher.now
[all...]
/fuchsia/zircon/system/ulib/fs-test-utils/
H A Dperftest.cpp83 return (fzl::TicksToNs(zx::ticks::now() - start).to_msecs());
127 test_case_count, fzl::TicksToNs(zx::ticks::now() - start).to_msecs());
161 zx::ticks test_start = zx::ticks::now();
200 zx::ticks start = zx::ticks::now();
265 zx::ticks start = zx::ticks::now();

Completed in 126 milliseconds

123