Lines Matching full:duration
17 #define DURATION 100 macro
46 * duration in microseconds.
120 TIMER_ASSERT(interval_check(interval, DURATION), timer); in duration_expire()
172 * @brief Test duration and period of Timer
174 * Validates initial duration and period of timer.
177 * using k_timer_start() with specific initial duration and period.
179 * of duration and period.
190 k_timer_start(&duration_timer, K_MSEC(DURATION), K_MSEC(PERIOD)); in ZTEST_USER()
191 busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD / 2); in ZTEST_USER()
206 * @details Validates initial duration and period of timer. Start the timer with
207 * specific duration and period. Then starts the timer again, and check
219 k_timer_start(&status_anytime_timer, K_MSEC(DURATION), in ZTEST_USER()
221 busy_wait_ms(DURATION + PERIOD * (EXPIRE_TIMES - 1) + PERIOD / 2); in ZTEST_USER()
224 k_timer_start(&status_anytime_timer, K_MSEC(DURATION), in ZTEST_USER()
238 * Validates initial timer duration, keeping timer period to zero.
241 * using k_timer_start() with specific initial duration and period as
255 K_TICKS(k_ms_to_ticks_floor32(DURATION) in ZTEST_USER()
256 - BUSY_SLEW_THRESHOLD_TICKS(DURATION in ZTEST_USER()
260 busy_wait_ms(2 * DURATION + 1); in ZTEST_USER()
275 * Validates initial timer duration, keeping timer period to K_FOREVER.
278 * using k_timer_start() with specific initial duration and period as
293 K_TICKS(k_ms_to_ticks_floor32(DURATION) - in ZTEST_USER()
294 BUSY_SLEW_THRESHOLD_TICKS(DURATION * USEC_PER_MSEC)), in ZTEST_USER()
299 busy_wait_ms(2 * DURATION + 1); in ZTEST_USER()
330 k_timer_start(&expire_timer, K_MSEC(DURATION), K_MSEC(PERIOD)); in ZTEST_USER()
331 busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD / 2); in ZTEST_USER()
382 /** TESTPOINT: set duration 0 */ in ZTEST_USER()
386 * whatever duration that was set. Since timer is likely in ZTEST_USER()
441 k_timer_start(&status_timer, K_MSEC(DURATION), K_MSEC(PERIOD)); in ZTEST_USER()
445 TIMER_ASSERT(k_timer_remaining_get(&status_timer) >= DURATION / 2, in ZTEST_USER()
453 * @brief Test Timer status randomly after certain duration
458 * using k_timer_start() with specific initial duration and period.
459 * Checks for timer status randomly after certain duration.
470 k_timer_start(&status_anytime_timer, K_MSEC(DURATION), in ZTEST_USER()
472 busy_wait_ms(DURATION + PERIOD * (EXPIRE_TIMES - 1) + PERIOD / 2); in ZTEST_USER()
504 k_timer_start(&status_sync_timer, K_MSEC(DURATION), K_MSEC(PERIOD)); in ZTEST_USER()
517 k_timer_start(&status_sync_timer, K_MSEC(DURATION), K_MSEC(PERIOD)); in ZTEST_USER()
533 * duration and period. Stops the timer using k_timer_stop() and checks
534 * for proper completion of duration and period.
545 k_timer_start(&ktimer, K_MSEC(DURATION), K_MSEC(PERIOD)); in ZTEST_USER()
546 busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD / 2); in ZTEST_USER()
557 k_timer_start(&ktimer, K_MSEC(DURATION), K_MSEC(PERIOD)); in ZTEST_USER()
563 busy_wait_ms(DURATION / 2); in ZTEST_USER()
564 k_timer_start(&ktimer, K_MSEC(DURATION), K_MSEC(PERIOD)); in ZTEST_USER()
566 busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD / 2); in ZTEST_USER()
615 * k_timer_start() with specific initial duration, along with associated
668 * Starts a timer, busy-waits for half the DURATION, then checks the
680 uint32_t dur_ticks = k_ms_to_ticks_ceil32(DURATION); in ZTEST_USER()
681 uint32_t target_rem_ticks = k_ms_to_ticks_ceil32(DURATION / 2); in ZTEST_USER()
699 k_timer_start(&remain_timer, K_MSEC(DURATION), K_NO_WAIT); in ZTEST_USER()
700 busy_wait_ms(DURATION / 2); in ZTEST_USER()
715 zassert_true(rem_ms <= (DURATION / 2) + k_ticks_to_ms_floor64(1), in ZTEST_USER()
718 /* Half the value of DURATION in ticks may not be the value of in ZTEST_USER()
719 * half DURATION in ticks, when DURATION/2 is not an integer in ZTEST_USER()
725 slew_ticks = BUSY_SLEW_THRESHOLD_TICKS(DURATION * USEC_PER_MSEC / 2U); in ZTEST_USER()