server: Fixed handling of a relative start time for a timer.
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 @@
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;