mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
tests: kernel: timer_api: use slew for duration timer test
Reduce the duration of the timer test so that it will fire before the busywait elapses even in the worst case of slew between the tick and busy-wait clocks. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
@@ -195,7 +195,11 @@ void test_timer_period_0(void)
|
||||
{
|
||||
init_timer_data();
|
||||
/** TESTPOINT: set period 0 */
|
||||
k_timer_start(&period0_timer, K_MSEC(DURATION), K_NO_WAIT);
|
||||
k_timer_start(&period0_timer,
|
||||
K_TICKS(k_ms_to_ticks_floor32(DURATION)
|
||||
- BUSY_SLEW_THRESHOLD_TICKS(DURATION
|
||||
* USEC_PER_MSEC)),
|
||||
K_NO_WAIT);
|
||||
tdata.timestamp = k_uptime_get();
|
||||
busy_wait_ms(DURATION + 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user