mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-27 03:51:57 -06:00
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 <https://bugs.launchpad.net/qemu/+bug/893208/> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20170418191817.10430-1-bobby.prani@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
a14f9b8292
commit
d1bb099f63
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue