diff --git a/rpcs3/Emu/RSX/Common/time.hpp b/rpcs3/Emu/RSX/Common/time.hpp index 5faed311f5..430ba3fade 100644 --- a/rpcs3/Emu/RSX/Common/time.hpp +++ b/rpcs3/Emu/RSX/Common/time.hpp @@ -9,9 +9,11 @@ namespace rsx { static inline u64 uclock() { - if (const u64 freq = (utils::get_tsc_freq() / 1000000)) + static const ullong s_tsc_scaled_freq = (utils::get_tsc_freq() / 1000000); + + if (s_tsc_scaled_freq) { - return utils::get_tsc() / freq; + return utils::get_tsc() / s_tsc_scaled_freq; } else {