From: Cao jin <caoj.f...@cn.fujitsu.com>

The function actually returns monotonic time value in nanosecond,
the "ticks" is not suitable.

Cc: Paolo Bonzini <pbonz...@redhat.com>
Cc  Peter Crosthwaite <crosthwaite.pe...@gmail.com>
Cc: Richard Henderson <r...@twiddle.net>
Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com>
Message-Id: <1469790338-28990-3-git-send-email-caoj.f...@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
 cpus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cpus.c b/cpus.c
index 84c3520..e11caf7 100644
--- a/cpus.c
+++ b/cpus.c
@@ -219,14 +219,14 @@ int64_t cpu_get_ticks(void)
 
 static int64_t cpu_get_clock_locked(void)
 {
-    int64_t ticks;
+    int64_t time;
 
-    ticks = timers_state.cpu_clock_offset;
+    time = timers_state.cpu_clock_offset;
     if (timers_state.cpu_ticks_enabled) {
-        ticks += get_clock();
+        time += get_clock();
     }
 
-    return ticks;
+    return time;
 }
 
 /* return the host CPU monotonic timer and handle stop/restart */
-- 
1.8.3.1



Reply via email to