Lines Matching +full:1 +full:ms

25 	uint32_t wait_times[] =  {1, 30, 0, 121, 10000};  in ZTEST()
49 #define WASTED_TIME 1000 /* 1ms */
58 #define ONE_AND_HALF_TICKS (ONE_TICK_TIME + (ONE_TICK_TIME>>1))
59 #define TWO_AND_HALF_TICKS ((ONE_TICK_TIME<<1) + (ONE_TICK_TIME>>1))
70 K_SEM_DEFINE(start_sema, 0, 1);
71 K_SEM_DEFINE(end_sema, 0, 1);
92 k_sleep(Z_TIMEOUT_TICKS(1)); in thread_entry()
105 * For native_posix it works, with a tick of 10ms. In general this test will
115 k_sleep(Z_TIMEOUT_TICKS(1)); /* Wait until tick boundary */ in ZTEST()
119 k_busy_wait(TWO_TICKS_TIME + 1); in ZTEST()
121 * WASTED_TIME us (1ms) right after 2*one_tick_time in ZTEST()
122 * As that is longer than 2 ticks + 1us, the total in ZTEST()
134 k_sleep(Z_TIMEOUT_TICKS(1)); /* Wait until tick boundary */ in ZTEST()
139 /* The thread should have used WASTED_TIME us (1ms) after in ZTEST()
154 k_sleep(Z_TIMEOUT_TICKS(1)); /* Wait until tick boundary */ in ZTEST()
158 posix_cpu_hold(TWO_TICKS_TIME + 1); in ZTEST()
160 * so the total should be 2 ticks + WASTED_TIME + 1. in ZTEST()
161 * That is we spend 2 ticks + 1 us in this context as requested. in ZTEST()
165 zassert_true(time2 - time1 == TWO_TICKS_TIME + WASTED_TIME + 1, in ZTEST()
168 time2, time1, TWO_TICKS_TIME + WASTED_TIME + 1); in ZTEST()
172 k_sleep(Z_TIMEOUT_TICKS(1)); /* Wait until tick boundary */ in ZTEST()
213 * 10ms
224 k_sleep(Z_TIMEOUT_TICKS(1)); /* Wait until a tick boundary */ in ZTEST()
226 IRQ_CONNECT(TIMER_TICK_IRQ, 1, np_timer_isr_test_replacement, 0, 0); in ZTEST()
229 k_busy_wait(ONE_TICK_TIME + 1); in ZTEST()
230 /* Just after ONE_TICK_TIME (10ms) the timer interrupt has come, in ZTEST()
231 * causing a delay of WASTED_TIME (1ms), so the k_busy_wait() in ZTEST()
232 * returns immediately as it was waiting for 10.001 ms in ZTEST()
242 k_sleep(Z_TIMEOUT_TICKS(1)); /* Wait until tick boundary */ in ZTEST()
246 /* Just after ONE_TICK_TIME (10ms) the timer interrupt has come, in ZTEST()
247 * causing a delay of WASTED_TIME (1ms), after that, the k_busy_wait() in ZTEST()
248 * continues until 15ms in ZTEST()
259 k_sleep(Z_TIMEOUT_TICKS(1)); /* Wait until tick boundary */ in ZTEST()
262 posix_cpu_hold(ONE_TICK_TIME + 1); in ZTEST()
263 /* Just after ONE_TICK_TIME (10ms) the timer interrupt has come, in ZTEST()
264 * causing a delay of WASTED_TIME (1ms), but posix_cpu_hold continues in ZTEST()
265 * until it spends 10.001 ms in this context. That is 11.001ms in total in ZTEST()
269 zassert_true(time2 - time1 == ONE_TICK_TIME + 1 + WASTED_TIME, in ZTEST()
275 k_sleep(Z_TIMEOUT_TICKS(1)); /* Wait until tick boundary */ in ZTEST()
279 /* Just after ONE_TICK_TIME (10ms) the timer interrupt has come, in ZTEST()
280 * causing a delay of WASTED_TIME (1ms), but posix_cpu_hold continues in ZTEST()
281 * until it spends 15ms in this context. That is 16ms in total in ZTEST()