mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
server: Fix an incorrect time calculation.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
This commit is contained in:
parent
4ad3025249
commit
a45ff74b3d
@ -233,7 +233,7 @@ unsigned int spice_timer_queue_get_timeout_ms(void)
|
||||
head_timer = SPICE_CONTAINEROF(head, SpiceTimer, active_link);
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
now_ms = ((int64_t)now.tv_sec * 1000) - (now.tv_nsec / 1000 / 1000);
|
||||
now_ms = ((int64_t)now.tv_sec * 1000) + (now.tv_nsec / 1000 / 1000);
|
||||
|
||||
return MAX(0, ((int64_t)head_timer->expiry_time - now_ms));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user