diff --git a/sched/hrtimer/hrtimer.h b/sched/hrtimer/hrtimer.h index 9ec29bc227f..606cd086350 100644 --- a/sched/hrtimer/hrtimer.h +++ b/sched/hrtimer/hrtimer.h @@ -43,7 +43,7 @@ /* Delay used while waiting for a running hrtimer callback to complete */ -#define HRTIMER_CANCEL_SYNC_DELAY_MS 5 +#define HRTIMER_CANCEL_SYNC_DELAY_US CONFIG_USEC_PER_TICK /**************************************************************************** * Public Types @@ -513,7 +513,7 @@ static inline_function void hrtimer_wait(FAR hrtimer_t *timer) { if (!up_interrupt_context() && !is_idle_task(this_task())) { - nxsched_msleep(HRTIMER_CANCEL_SYNC_DELAY_MS); + nxsched_usleep(HRTIMER_CANCEL_SYNC_DELAY_US); } /* Otherwise, spin-wait is enough. */