server: Fixed handling of a relative start time for a timer.
This commit is contained in:
parent
39d615eeed
commit
c3624439c8
|
@ -164,8 +164,7 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period
|
|||
period = 0; /* period doesn't make any sense for a manual timer */
|
||||
timer->signaled = 0;
|
||||
}
|
||||
if (expire > 0 && expire < current_time) expire = current_time;
|
||||
timer->when = expire;
|
||||
timer->when = (expire <= 0) ? current_time - expire : max( expire, current_time );
|
||||
timer->period = period;
|
||||
timer->callback = callback;
|
||||
timer->arg = arg;
|
||||
|
|
Loading…
Reference in New Issue