[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH 2/3] cpus: rename local variable to meaningful one
From: |
Cao jin |
Subject: |
[Qemu-trivial] [PATCH 2/3] cpus: rename local variable to meaningful one |
Date: |
Fri, 29 Jul 2016 19:05:37 +0800 |
The function actually returns monotonic time value in nanosecond,
the "ticks" is not suitable.
Cc: Paolo Bonzini <address@hidden>
Cc Peter Crosthwaite <address@hidden>
Cc: Richard Henderson <address@hidden>
Signed-off-by: Cao jin <address@hidden>
---
cpus.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpus.c b/cpus.c
index d4afd93..d534f78 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 time */
--
2.1.0