Module: wine Branch: master Commit: c3624439c888c17180b0c60c7db478241fcc51b3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c3624439c888c17180b0c60c7d...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Aug 9 17:16:26 2007 +0200
server: Fixed handling of a relative start time for a timer.
---
server/timer.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/server/timer.c b/server/timer.c index ffa4b03..05c0e81 100644 --- a/server/timer.c +++ b/server/timer.c @@ -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;