diff --git a/sys/ztimer/util.c b/sys/ztimer/util.c index e8074f6ebf..115af57d40 100644 --- a/sys/ztimer/util.c +++ b/sys/ztimer/util.c @@ -55,14 +55,13 @@ void ztimer_sleep(ztimer_clock_t *clock, uint32_t duration) mutex_lock(&mutex); } -void ztimer_periodic_wakeup(ztimer_clock_t *clock, ztimer_now_t *last_wakeup, +void ztimer_periodic_wakeup(ztimer_clock_t *clock, uint32_t *last_wakeup, uint32_t period) { unsigned state = irq_disable(); - ztimer_now_t now = ztimer_now(clock); - ztimer_now_t target = *last_wakeup + period; - ztimer_now_t offset = target - now; - + uint32_t now = ztimer_now(clock); + uint32_t target = *last_wakeup + period; + uint32_t offset = target - now; irq_restore(state); if (offset <= period) {