mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
timer_settime:fix set time when flag is TIMER_ABSTIME.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user