[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 1/3] icount: base rt_clock on icount.
From: |
fred . konrad |
Subject: |
[Qemu-devel] [RFC 1/3] icount: base rt_clock on icount. |
Date: |
Thu, 18 Jul 2013 17:02:35 +0200 |
From: KONRAD Frederic <address@hidden>
This bases rt_clock on icount, as vm_clock.
So vm_clock = rt_clock.
Signed-off-by: KONRAD Frederic <address@hidden>
---
qemu-timer.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/qemu-timer.c b/qemu-timer.c
index b2d95e2..6c607e5 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -401,7 +401,11 @@ int64_t qemu_get_clock_ns(QEMUClock *clock)
switch(clock->type) {
case QEMU_CLOCK_REALTIME:
- return get_clock();
+ if (use_icount) {
+ return cpu_get_icount();
+ } else {
+ return get_clock();
+ }
default:
case QEMU_CLOCK_VIRTUAL:
if (use_icount) {
--
1.8.1.4