mirror of https://gitee.com/openkylin/qemu.git
cpus: rename local variable to meaningful one
The function actually returns monotonic time value in nanosecond, the "ticks" is not suitable. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc Peter Crosthwaite <crosthwaite.peter@gmail.com> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Message-Id: <1469790338-28990-3-git-send-email-caoj.fnst@cn.fujitsu.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
490ab15a49
commit
1d45cea549
8
cpus.c
8
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 */
|
||||
|
|
Loading…
Reference in New Issue