timer_settime:fix set time when flag is TIMER_ABSTIME.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
This commit is contained in:
parent
213d5538fc
commit
81b97b676b
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue