mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-06-06 23:36:10 +00:00
cleanup qemu/util/qemu-timer-common.c
This commit is contained in:
parent
e98a396e68
commit
0d51163abc
|
@ -181,8 +181,6 @@ static inline int64_t get_clock(void)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
extern int use_rt_clock;
|
|
||||||
|
|
||||||
static inline int64_t get_clock(void)
|
static inline int64_t get_clock(void)
|
||||||
{
|
{
|
||||||
return get_clock_realtime();
|
return get_clock_realtime();
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
/* real time host monotonic timer */
|
/* real time host monotonic timer */
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
int64_t clock_freq;
|
int64_t clock_freq;
|
||||||
|
|
||||||
INITIALIZER(init_get_clock)
|
INITIALIZER(init_get_clock)
|
||||||
|
@ -41,21 +40,4 @@ INITIALIZER(init_get_clock)
|
||||||
}
|
}
|
||||||
clock_freq = freq.QuadPart;
|
clock_freq = freq.QuadPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
int use_rt_clock;
|
|
||||||
|
|
||||||
INITIALIZER(init_get_clock)
|
|
||||||
{
|
|
||||||
use_rt_clock = 0;
|
|
||||||
#ifdef CLOCK_MONOTONIC
|
|
||||||
{
|
|
||||||
struct timespec ts;
|
|
||||||
if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
|
|
||||||
use_rt_clock = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue