Home
last modified time | relevance | path

Searched refs:now (Results 1 – 25 of 257) sorted by relevance

1234567891011

/Zephyr-Core-3.6.0/tests/unit/net_timeout/
Dmain.c49 uint32_t now = 4; in ZTEST() local
54 net_timeout_set(&nto, 0, now); in ZTEST()
55 zassert_equal(nto.timer_start, now); in ZTEST()
61 ++now; in ZTEST()
63 net_timeout_set(&nto, lifetime, now); in ZTEST()
64 zassert_equal(nto.timer_start, now); in ZTEST()
71 ++now; in ZTEST()
73 net_timeout_set(&nto, lifetime, now); in ZTEST()
74 zassert_equal(nto.timer_start, now); in ZTEST()
81 ++now; in ZTEST()
[all …]
/Zephyr-Core-3.6.0/samples/boards/nrf/battery/src/
Dmain.c37 uint32_t now = k_uptime_get_32(); in now_str() local
38 unsigned int ms = now % MSEC_PER_SEC; in now_str()
43 now /= MSEC_PER_SEC; in now_str()
44 s = now % 60U; in now_str()
45 now /= 60U; in now_str()
46 min = now % 60U; in now_str()
47 now /= 60U; in now_str()
48 h = now; in now_str()
/Zephyr-Core-3.6.0/samples/sensor/dht/src/
Dmain.c15 uint32_t now = k_uptime_get_32(); in now_str() local
16 unsigned int ms = now % MSEC_PER_SEC; in now_str()
21 now /= MSEC_PER_SEC; in now_str()
22 s = now % 60U; in now_str()
23 now /= 60U; in now_str()
24 min = now % 60U; in now_str()
25 now /= 60U; in now_str()
26 h = now; in now_str()
/Zephyr-Core-3.6.0/subsys/net/ip/
Dnet_timeout.c12 uint32_t now) in net_timeout_set() argument
16 timeout->timer_start = now; in net_timeout_set()
45 int64_t now) in net_timeout_deadline() argument
53 start = (uint64_t)now; in net_timeout_deadline()
54 start -= (uint32_t)now - timeout->timer_start; in net_timeout_deadline()
65 uint32_t now) in net_timeout_remaining() argument
70 ret -= (int64_t)(int32_t)(now - timeout->timer_start); in net_timeout_remaining()
79 uint32_t now) in net_timeout_evaluate() argument
87 elapsed = now - timeout->timer_start; in net_timeout_evaluate()
118 timeout->timer_start = now; in net_timeout_evaluate()
/Zephyr-Core-3.6.0/tests/benchmarks/cmsis_dsp/common/
Dbenchmark_common.h49 volatile uint32_t now; in benchmark_begin() local
55 now = k_cycle_get_32(); in benchmark_begin()
58 *timestamp = now; in benchmark_begin()
63 volatile uint32_t now; in benchmark_end() local
66 now = k_cycle_get_32(); in benchmark_end()
72 return now - timestamp; in benchmark_end()
/Zephyr-Core-3.6.0/drivers/timer/
Dmcux_gpt_timer.c56 uint32_t now; in gpt_set_safe() local
60 now = GPT_GetCurrentTimerCount(base); in gpt_set_safe()
70 if (unlikely(((int32_t)(next - now)) <= 1)) { in gpt_set_safe()
74 next = now + bump; in gpt_set_safe()
79 now = GPT_GetCurrentTimerCount(base); in gpt_set_safe()
80 } while ((((int32_t)(next - now)) <= 1) && (next < MAX_CYCLES)); in gpt_set_safe()
89 uint32_t tick_delta = 0, now, status; in mcux_imx_gpt_isr() local
94 now = GPT_GetCurrentTimerCount(base); in mcux_imx_gpt_isr()
114 tick_delta += (now - announced_cycles) / CYC_PER_TICK; in mcux_imx_gpt_isr()
115 announced_cycles += (((now - announced_cycles) / CYC_PER_TICK) * in mcux_imx_gpt_isr()
[all …]
Dhpet.c261 uint64_t now = hpet_counter_get(); in hpet_timer_comparator_set_safe() local
263 if (unlikely((int64_t)(next - now) <= 0)) { in hpet_timer_comparator_set_safe()
267 next = now + bump; in hpet_timer_comparator_set_safe()
270 now = hpet_counter_get(); in hpet_timer_comparator_set_safe()
271 } while ((int64_t)(next - now) <= 0); in hpet_timer_comparator_set_safe()
282 uint64_t now = hpet_counter_get(); in hpet_isr() local
300 int64_t diff = (int64_t)(now - last_count); in hpet_isr()
303 now = last_count; in hpet_isr()
306 uint32_t dticks = (uint32_t)((now - last_count) / cyc_per_tick); in hpet_isr()
385 uint64_t now = hpet_counter_get(); in sys_clock_elapsed() local
[all …]
Dcc13xx_cc26xx_rtc_timer.c70 uint32_t now; in setThreshold() local
76 now = AONRTCCurrentCompareValueGet(); in setThreshold()
80 if ((next - now) > (uint32_t)0x80000000) { in setThreshold()
82 next = now + COMPARE_MARGIN; in setThreshold()
83 } else if ((now + COMPARE_MARGIN - next) < (uint32_t)0x80000000) { in setThreshold()
84 if (next < now + COMPARE_MARGIN) { in setThreshold()
85 next = now + COMPARE_MARGIN; in setThreshold()
Dmcux_os_timer.c36 uint64_t now = OSTIMER_GetCurrentTimerValue(base); in mcux_lpc_ostick_isr() local
37 uint32_t dticks = (uint32_t)((now - last_count) / CYC_PER_TICK); in mcux_lpc_ostick_isr()
47 if ((int64_t)(next - now) < MIN_DELAY) { in mcux_lpc_ostick_isr()
70 uint64_t now = OSTIMER_GetCurrentTimerValue(base); in sys_clock_set_timeout() local
74 adj = (uint32_t)(now - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
82 if ((int32_t)(cyc + last_count - now) < MIN_DELAY) { in sys_clock_set_timeout()
/Zephyr-Core-3.6.0/tests/kernel/timer/starve/src/
Dmain.c25 static uint32_t now; variable
32 now / MSEC_PER_SEC, now % MSEC_PER_SEC, iters); in tag()
53 now = k_uptime_get_32(); in ZTEST()
54 if ((now / MSEC_PER_SEC) > CONFIG_APP_STOP_S) { in ZTEST()
60 if (now > stamp) { in ZTEST()
66 int32_t now_diff = now - last_now; in ZTEST()
72 last_now = now; in ZTEST()
/Zephyr-Core-3.6.0/samples/sensor/mpu6050/src/
Dmain.c15 uint32_t now = k_uptime_get_32(); in now_str() local
16 unsigned int ms = now % MSEC_PER_SEC; in now_str()
21 now /= MSEC_PER_SEC; in now_str()
22 s = now % 60U; in now_str()
23 now /= 60U; in now_str()
24 min = now % 60U; in now_str()
25 now /= 60U; in now_str()
26 h = now; in now_str()
/Zephyr-Core-3.6.0/samples/sensor/isl29035/src/
Dmain.c30 uint32_t now = k_uptime_get_32(); in now_str() local
31 unsigned int ms = now % MSEC_PER_SEC; in now_str()
36 now /= MSEC_PER_SEC; in now_str()
37 s = now % 60U; in now_str()
38 now /= 60U; in now_str()
39 min = now % 60U; in now_str()
40 now /= 60U; in now_str()
41 h = now; in now_str()
/Zephyr-Core-3.6.0/tests/posix/common/src/
Dsleep.c30 uint32_t now; in ZTEST() local
42 now = k_uptime_get(); in ZTEST()
43 zassert_true((now - then) >= 1 * MSEC_PER_SEC); in ZTEST()
48 now = k_uptime_get(); in ZTEST()
49 zassert_true((now - then) >= 2 * MSEC_PER_SEC); in ZTEST()
61 uint32_t now; in ZTEST() local
71 now = k_uptime_get(); in ZTEST()
72 zassert_true(((now - then) * USEC_PER_MSEC) / (USEC_PER_SEC - 1) >= 1); in ZTEST()
/Zephyr-Core-3.6.0/tests/kernel/threads/no-multithreading/src/
Dmain.c13 int64_t now = k_uptime_get(); in ZTEST() local
16 while (k_uptime_get() != now) { in ZTEST()
24 now = k_uptime_get(); in ZTEST()
28 int64_t diff = k_uptime_get() - now; in ZTEST()
62 int64_t now, diff; in ZTEST() local
65 now = k_uptime_get(); in ZTEST()
73 diff = k_uptime_get() - now; in ZTEST()
/Zephyr-Core-3.6.0/samples/sensor/icm42605/src/
Dmain.c15 uint32_t now = k_uptime_get_32(); in now_str() local
16 unsigned int ms = now % MSEC_PER_SEC; in now_str()
21 now /= MSEC_PER_SEC; in now_str()
22 s = now % 60U; in now_str()
23 now /= 60U; in now_str()
24 min = now % 60U; in now_str()
25 now /= 60U; in now_str()
26 h = now; in now_str()
/Zephyr-Core-3.6.0/include/zephyr/net/
Dnet_timeout.h97 uint32_t now);
113 int64_t now);
133 uint32_t now);
154 uint32_t now);
/Zephyr-Core-3.6.0/samples/boards/nrf/nrf53_sync_rtc/src/
Dmain.c29 uint32_t now = sys_clock_tick_get_32(); in timeout_handler() local
31 *(volatile uint32_t *)shared_cell = now; in timeout_handler()
34 LOG_INF("IPC send at %d ticks", now); in timeout_handler()
37 if (now > sys_clock_hw_cycles_per_sec()) { in timeout_handler()
/Zephyr-Core-3.6.0/tests/drivers/timer/nrf_rtc_timer/src/
Dmain.c74 uint64_t now = z_nrf_rtc_timer_read(); in timeout_handler() local
75 uint64_t diff = (now - expire_time); in timeout_handler()
80 now, data->target_time, expire_time); in timeout_handler()
149 uint64_t now = z_nrf_rtc_timer_read(); in ZTEST() local
152 .target_time = now + t, in ZTEST()
213 int64_t now = sys_clock_tick_get(); in sched_handler() local
215 z_nrf_rtc_timer_get_ticks(Z_TIMEOUT_TICKS(Z_TICK_ABS(now))); in sched_handler()
219 k_ticks_to_us_floor64(now - (rtc_ticks_now - expire_time)); in sched_handler()
320 uint64_t now = z_nrf_rtc_timer_read(); in ZTEST() local
322 .target_time = now + 5, in ZTEST()
[all …]
/Zephyr-Core-3.6.0/samples/sensor/mcp9808/src/
Dmain.c21 uint32_t now = k_uptime_get_32(); in now_str() local
22 unsigned int ms = now % MSEC_PER_SEC; in now_str()
27 now /= MSEC_PER_SEC; in now_str()
28 s = now % 60U; in now_str()
29 now /= 60U; in now_str()
30 min = now % 60U; in now_str()
31 now /= 60U; in now_str()
32 h = now; in now_str()
/Zephyr-Core-3.6.0/samples/sensor/adt7420/src/
Dmain.c25 uint32_t now = k_uptime_get_32(); in now_str() local
26 unsigned int ms = now % MSEC_PER_SEC; in now_str()
31 now /= MSEC_PER_SEC; in now_str()
32 s = now % 60U; in now_str()
33 now /= 60U; in now_str()
34 min = now % 60U; in now_str()
35 now /= 60U; in now_str()
36 h = now; in now_str()
/Zephyr-Core-3.6.0/tests/posix/eventfd/src/
Dstress.c57 uint64_t now; in th_fun() local
65 for (now = k_uptime_get(), end = now + end_ms, report = now + report_ms; now < end; in th_fun()
66 now = k_uptime_get()) { in th_fun()
76 if (now >= report) { in th_fun()
/Zephyr-Core-3.6.0/tests/kernel/timer/cycle64/src/
Dmain.c33 uint32_t timeout(uint64_t prev, uint64_t now) in timeout() argument
35 uint64_t next = prev + BIT64(32) - now; in timeout()
53 uint64_t now; in ZTEST() local
67 now = k_cycle_get_64(); in ZTEST()
69 c64[CURR] = now; in ZTEST()
/Zephyr-Core-3.6.0/samples/sensor/ccs811/src/
Dmain.c20 uint32_t now = k_uptime_get_32(); in now_str() local
21 unsigned int ms = now % MSEC_PER_SEC; in now_str()
26 now /= MSEC_PER_SEC; in now_str()
27 s = now % 60U; in now_str()
28 now /= 60U; in now_str()
29 min = now % 60U; in now_str()
30 now /= 60U; in now_str()
31 h = now; in now_str()
/Zephyr-Core-3.6.0/samples/kernel/condition_variables/simple/
DREADME.rst139 [thread 0] done is now 1. Signalling cond.
142 [thread 1] done is now 2. Signalling cond.
145 [thread 2] done is now 3. Signalling cond.
148 [thread 3] done is now 4. Signalling cond.
151 [thread 4] done is now 5. Signalling cond.
154 [thread 5] done is now 6. Signalling cond.
157 [thread 6] done is now 7. Signalling cond.
160 [thread 7] done is now 8. Signalling cond.
163 [thread 8] done is now 9. Signalling cond.
166 [thread 9] done is now 10. Signalling cond.
[all …]
/Zephyr-Core-3.6.0/kernel/
Dusage.c23 uint32_t now; in usage_now() local
26 now = (uint32_t)timing_counter_get(); in usage_now()
28 now = k_cycle_get_32(); in usage_now()
32 return (now == 0) ? 1 : now; in usage_now()
132 uint32_t now = usage_now(); in z_sched_cpu_usage() local
133 uint32_t cycles = now - cpu->usage0; in z_sched_cpu_usage()
148 cpu->usage0 = now; in z_sched_cpu_usage()
184 uint32_t now = usage_now(); in z_sched_thread_usage() local
185 uint32_t cycles = now - cpu->usage0; in z_sched_thread_usage()
200 cpu->usage0 = now; in z_sched_thread_usage()
[all …]

1234567891011