Message ID | 1497362826-21125-11-git-send-email-peter.maydell@linaro.org |
---|---|
State | New |
Headers | show |
diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 8a1eb74..1b518bc 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -1020,10 +1020,9 @@ static inline int64_t cpu_get_host_ticks(void) /* The host CPU doesn't have an easily accessible cycle counter. Just return a monotonically increasing value. This will be totally wrong, but hopefully better than nothing. */ -static inline int64_t cpu_get_host_ticks (void) +static inline int64_t cpu_get_host_ticks(void) { - static int64_t ticks = 0; - return ticks++; + return get_clock(); } #endif