timer_settime:fix set time when flag is TIMER_ABSTIME.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
This commit is contained in:
yangguangcai 2024-08-19 15:37:42 +08:00 committed by Xiang Xiao
parent 213d5538fc
commit 81b97b676b

View file

@ -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
{