From ad620c29c2da573e3a5f13f5b1eb2694fee64cfb Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sun, 13 Mar 2011 10:30:52 +0000 Subject: win32: implement missing timersub Implement and wrap timersub() for Win32. Acked-by: Stefan Weil Signed-off-by: Blue Swirl --- ui/vnc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/vnc.c') diff --git a/ui/vnc.c b/ui/vnc.c index 34dc0cd..1b68965 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2302,7 +2302,7 @@ static int vnc_update_stats(VncDisplay *vd, struct timeval * tv) } } - timersub(tv, &VNC_REFRESH_STATS, &res); + qemu_timersub(tv, &VNC_REFRESH_STATS, &res); if (timercmp(&vd->guest.last_freq_check, &res, >)) { return has_dirty; @@ -2320,7 +2320,7 @@ static int vnc_update_stats(VncDisplay *vd, struct timeval * tv) } max = rect->times[(rect->idx + count - 1) % count]; - timersub(tv, &max, &res); + qemu_timersub(tv, &max, &res); if (timercmp(&res, &VNC_REFRESH_LOSSY, >)) { rect->freq = 0; @@ -2331,7 +2331,7 @@ static int vnc_update_stats(VncDisplay *vd, struct timeval * tv) min = rect->times[rect->idx]; max = rect->times[(rect->idx + count - 1) % count]; - timersub(&max, &min, &res); + qemu_timersub(&max, &min, &res); rect->freq = res.tv_sec + res.tv_usec / 1000000.; rect->freq /= count; -- cgit v1.1