aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qemu-timer.c2
-rw-r--r--tests/test-aio.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/qemu-timer.c b/qemu-timer.c
index eb22e9218b..9299cdc5fb 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 982339c801..03aa846970 100644
--- a/tests/test-aio.c
+++ b/tests/test-aio.c
@@ -452,7 +452,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
@@ -782,7 +782,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;