diff options
| author | 2022-01-28 20:04:24 -0500 | |
|---|---|---|
| committer | 2022-01-28 20:04:24 -0500 | |
| commit | 11099dda2e2ab67ba4861d1e927afaa2ccce1efa (patch) | |
| tree | d89af13af3a1538f9fe676cdf58a3baec7a22fb0 /src/common/wall_clock.cpp | |
| parent | Merge pull request #7800 from ameerj/spirv-int64-storage (diff) | |
| parent | wall_clock: use standard wall clock if rtsc frequency is too low (diff) | |
| download | yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.tar.gz yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.tar.xz yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.zip | |
Merge pull request #7791 from german77/wall_clock
wall_clock: Use standard wall clock if rtsc frequency is too low
Diffstat (limited to 'src/common/wall_clock.cpp')
| -rw-r--r-- | src/common/wall_clock.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp index 49830b8ab..ffa282e88 100644 --- a/src/common/wall_clock.cpp +++ b/src/common/wall_clock.cpp | |||
| @@ -72,7 +72,9 @@ std::unique_ptr<WallClock> CreateBestMatchingClock(u32 emulated_cpu_frequency, | |||
| 72 | if (caps.invariant_tsc) { | 72 | if (caps.invariant_tsc) { |
| 73 | rtsc_frequency = EstimateRDTSCFrequency(); | 73 | rtsc_frequency = EstimateRDTSCFrequency(); |
| 74 | } | 74 | } |
| 75 | if (rtsc_frequency == 0) { | 75 | |
| 76 | // Fallback to StandardWallClock if rtsc period is higher than a nano second | ||
| 77 | if (rtsc_frequency <= 1000000000) { | ||
| 76 | return std::make_unique<StandardWallClock>(emulated_cpu_frequency, | 78 | return std::make_unique<StandardWallClock>(emulated_cpu_frequency, |
| 77 | emulated_clock_frequency); | 79 | emulated_clock_frequency); |
| 78 | } else { | 80 | } else { |