From c3624439c888c17180b0c60c7db478241fcc51b3 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard <julliard@winehq.org> Date: Thu, 9 Aug 2007 17:16:26 +0200 Subject: [PATCH] server: Fixed handling of a relative start time for a timer. --- server/timer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/timer.c b/server/timer.c index ffa4b0354bd..05c0e81afd6 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; -- GitLab