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:
Cao jin 2016-07-29 19:05:37 +08:00 committed by Paolo Bonzini
parent 490ab15a49
commit 1d45cea549
1 changed files with 4 additions and 4 deletions

8
cpus.c
View File

@ -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 */