mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 23:02:47 +01:00
Native Clock: remove inaccuracy mask.
This commit is contained in:
parent
86ccce3721
commit
f5c1d7b8c8
2 changed files with 1 additions and 6 deletions
|
@ -90,7 +90,7 @@ u64 NativeClock::GetRTSC() {
|
|||
} while (!time_point.compare_exchange_weak(
|
||||
current_time_point, new_time_point, std::memory_order_release, std::memory_order_acquire));
|
||||
/// The clock cannot be more precise than the guest timer, remove the lower bits
|
||||
return new_time_point.accumulated_ticks & inaccuracy_mask;
|
||||
return new_time_point.accumulated_ticks;
|
||||
}
|
||||
|
||||
void NativeClock::Pause(bool is_paused) {
|
||||
|
|
|
@ -34,11 +34,6 @@ private:
|
|||
u64 accumulated_ticks{};
|
||||
};
|
||||
|
||||
/// value used to reduce the native clocks accuracy as some apss rely on
|
||||
/// undefined behavior where the level of accuracy in the clock shouldn't
|
||||
/// be higher.
|
||||
static constexpr u64 inaccuracy_mask = ~(UINT64_C(0x400) - 1);
|
||||
|
||||
std::atomic<TimePoint> time_point;
|
||||
// factors
|
||||
u64 clock_rtsc_factor{};
|
||||
|
|
Loading…
Reference in a new issue