[Base] Don't use raw clock where unsupported

This commit is contained in:
Triang3l
2021-09-13 23:13:02 +03:00
parent 7aeac37eb6
commit f91b895c9a
3 changed files with 17 additions and 6 deletions

View File

@@ -109,18 +109,20 @@ inline uint64_t QueryGuestSystemTimeOffset() {
}
uint64_t Clock::QueryHostTickFrequency() {
#if XE_CLOCK_RAW_AVAILABLE
if (cvars::clock_source_raw) {
return host_tick_frequency_raw();
} else {
return host_tick_frequency_platform();
}
#endif
return host_tick_frequency_platform();
}
uint64_t Clock::QueryHostTickCount() {
#if XE_CLOCK_RAW_AVAILABLE
if (cvars::clock_source_raw) {
return host_tick_count_raw();
} else {
return host_tick_count_platform();
}
#endif
return host_tick_count_platform();
}
double Clock::guest_time_scalar() { return guest_time_scalar_; }