diff --git a/sched/timer/timer_settime.c b/sched/timer/timer_settime.c index 866d8d58bd..dd08d12956 100644 --- a/sched/timer/timer_settime.c +++ b/sched/timer/timer_settime.c @@ -305,7 +305,9 @@ int timer_settime(timer_t timerid, int flags, { /* Calculate a delay corresponding to the absolute time in 'value' */ - timer->pt_expected = clock_time2ticks(&value->it_value); + clock_abstime2ticks(timer->pt_clock, &value->it_value, + &timer->pt_expected); + timer->pt_expected += clock_systime_ticks(); } else {