diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2011-03-21 21:28:38 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-03-21 21:28:38 +0100 |
commit | aa315f95b7c3c5b032cbc6c78f434a871002f558 (patch) | |
tree | 61c0142bd9a3f43aa6f800fcaebc2e1f0ccf5f5b /ui | |
parent | 32465727627711ff3e1cde6777a014413c3cb9ee (diff) | |
parent | 6d5ad9bf9318b1555d5567cd7e1760a51a55ebf8 (diff) |
Merge branch 'for-anthony' of git://github.com/bonzini/qemu
* 'for-anthony' of git://github.com/bonzini/qemu:
remove qemu_get_clock
add a generic scaling mechanism for timers
change all other clock references to use nanosecond resolution accessors
change all rt_clock references to use millisecond resolution accessors
add more helper functions with explicit milli/nanosecond resolution
Diffstat (limited to 'ui')
-rw-r--r-- | ui/spice-core.c | 4 | ||||
-rw-r--r-- | ui/vnc.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c index 1aa1a5ed18..ef56ed61a9 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -55,14 +55,14 @@ static SpiceTimer *timer_add(SpiceTimerFunc func, void *opaque) SpiceTimer *timer; timer = qemu_mallocz(sizeof(*timer)); - timer->timer = qemu_new_timer(rt_clock, func, opaque); + timer->timer = qemu_new_timer_ms(rt_clock, func, opaque); QTAILQ_INSERT_TAIL(&timers, timer, next); return timer; } static void timer_start(SpiceTimer *timer, uint32_t ms) { - qemu_mod_timer(timer->timer, qemu_get_clock(rt_clock) + ms); + qemu_mod_timer(timer->timer, qemu_get_clock_ms(rt_clock) + ms); } static void timer_cancel(SpiceTimer *timer) @@ -1875,8 +1875,8 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) if (data[0] > 3) { vd->timer_interval = VNC_REFRESH_INTERVAL_BASE; - if (!qemu_timer_expired(vd->timer, qemu_get_clock(rt_clock) + vd->timer_interval)) - qemu_mod_timer(vd->timer, qemu_get_clock(rt_clock) + vd->timer_interval); + if (!qemu_timer_expired(vd->timer, qemu_get_clock_ms(rt_clock) + vd->timer_interval)) + qemu_mod_timer(vd->timer, qemu_get_clock_ms(rt_clock) + vd->timer_interval); } switch (data[0]) { @@ -2441,7 +2441,7 @@ static void vnc_refresh(void *opaque) if (vnc_trylock_display(vd)) { vd->timer_interval = VNC_REFRESH_INTERVAL_BASE; - qemu_mod_timer(vd->timer, qemu_get_clock(rt_clock) + + qemu_mod_timer(vd->timer, qemu_get_clock_ms(rt_clock) + vd->timer_interval); return; } @@ -2468,14 +2468,14 @@ static void vnc_refresh(void *opaque) if (vd->timer_interval > VNC_REFRESH_INTERVAL_MAX) vd->timer_interval = VNC_REFRESH_INTERVAL_MAX; } - qemu_mod_timer(vd->timer, qemu_get_clock(rt_clock) + vd->timer_interval); + qemu_mod_timer(vd->timer, qemu_get_clock_ms(rt_clock) + vd->timer_interval); } static void vnc_init_timer(VncDisplay *vd) { vd->timer_interval = VNC_REFRESH_INTERVAL_BASE; if (vd->timer == NULL && !QTAILQ_EMPTY(&vd->clients)) { - vd->timer = qemu_new_timer(rt_clock, vnc_refresh, vd); + vd->timer = qemu_new_timer_ms(rt_clock, vnc_refresh, vd); vnc_dpy_resize(vd->ds); vnc_refresh(vd); } |