1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/evtimer: use now returned by set

This commit is contained in:
Francisco Molina 2021-12-14 13:18:02 +01:00
parent ab0e118d10
commit 240e778b8b

View File

@ -95,12 +95,9 @@ static void _set_timer(evtimer_t *evtimer)
evtimer_event_t *next_event = evtimer->events;
#if IS_USED(MODULE_EVTIMER_ON_ZTIMER)
evtimer->base = ztimer_now(ZTIMER_MSEC);
evtimer->base = ztimer_set(ZTIMER_MSEC, &evtimer->timer, next_event->offset);
DEBUG("evtimer: now=%" PRIu32 " ms setting ztimer to %" PRIu32 " ms\n",
evtimer->base, next_event->offset);
ztimer_set(ZTIMER_MSEC, &evtimer->timer, next_event->offset);
#else
uint64_t offset_us = (uint64_t)next_event->offset * US_PER_MS;