Make treatment of disabled clocks consistent in deadline calculation
Signed-off-by: Alex Bligh <[email protected]>
---
qemu-timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-timer.c b/qemu-timer.c
index 2a862bc..0617e3e 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -269,7 +269,7 @@ int64_t qemu_clock_deadline(QEMUClock *clock)
/* To avoid problems with overflow limit this to 2^32. */
int64_t delta = INT32_MAX;
- if (clock->active_timers) {
+ if (clock->enabled && clock->active_timers) {
delta = clock->active_timers->expire_time - qemu_get_clock_ns(clock);
}
if (delta < 0) {
--
1.7.9.5