diff options
-rw-r--r-- | qemu-timer.c | 2 | ||||
-rw-r--r-- | tests/test-aio.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/qemu-timer.c b/qemu-timer.c index 4441fe66ff..a8636cb3b8 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -129,7 +129,7 @@ static void qemu_clock_init(QEMUClockType type) assert(main_loop_tlg.tl[type] == NULL); clock->type = type; - clock->enabled = true; + clock->enabled = (type == QEMU_CLOCK_VIRTUAL ? false : true); clock->last = INT64_MIN; QLIST_INIT(&clock->timerlists); notifier_list_init(&clock->reset_notifiers); diff --git a/tests/test-aio.c b/tests/test-aio.c index 687dfa062e..39b8ce89d4 100644 --- a/tests/test-aio.c +++ b/tests/test-aio.c @@ -453,7 +453,7 @@ static void test_timer_schedule(void) { TimerTestData data = { .n = 0, .ctx = ctx, .ns = SCALE_MS * 750LL, .max = 2, - .clock_type = QEMU_CLOCK_VIRTUAL }; + .clock_type = QEMU_CLOCK_REALTIME }; EventNotifier e; /* aio_poll will not block to wait for timers to complete unless it has @@ -783,7 +783,7 @@ static void test_source_timer_schedule(void) { TimerTestData data = { .n = 0, .ctx = ctx, .ns = SCALE_MS * 750LL, .max = 2, - .clock_type = QEMU_CLOCK_VIRTUAL }; + .clock_type = QEMU_CLOCK_REALTIME }; EventNotifier e; int64_t expiry; |