Commit d1bb099f authored by Pranith Kumar's avatar Pranith Kumar Committed by Peter Maydell

timer.h: Provide better monotonic time

Tested and confirmed that the stretch i386 debian qcow2 image on a
raspberry pi 2 works.

Fixes: LP#: 893208 <>
Signed-off-by: 's avatarPranith Kumar <>
Reviewed-by: 's avatarPaolo Bonzini <>
Signed-off-by: 's avatarPeter Maydell <>
parent a14f9b82
......@@ -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();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment