diff options
| author | 2023-04-23 00:01:08 -0400 | |
|---|---|---|
| committer | 2023-06-07 21:44:42 -0400 | |
| commit | 8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf (patch) | |
| tree | 2bb7be86aafe9986811758b508a7581d2efe8ac4 /src/core/core_timing.h | |
| parent | nvnflinger: Acquire lock prior to signaling the vsync variable (diff) | |
| download | yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.tar.gz yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.tar.xz yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.zip | |
core_timing: Use CNTPCT as the guest CPU tick
Previously, we were mixing the raw CPU frequency and CNTFRQ.
The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
Diffstat (limited to 'src/core/core_timing.h')
| -rw-r--r-- | src/core/core_timing.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index e7c4a949f..fdacdd94a 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h | |||
| @@ -116,15 +116,9 @@ public: | |||
| 116 | return downcount; | 116 | return downcount; |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | /// Returns current time in emulated CPU cycles | 119 | /// Returns the current CNTPCT tick value. |
| 120 | u64 GetCPUTicks() const; | ||
| 121 | |||
| 122 | /// Returns current time in emulated in Clock cycles | ||
| 123 | u64 GetClockTicks() const; | 120 | u64 GetClockTicks() const; |
| 124 | 121 | ||
| 125 | /// Returns current time in nanoseconds. | ||
| 126 | std::chrono::nanoseconds GetCPUTimeNs() const; | ||
| 127 | |||
| 128 | /// Returns current time in microseconds. | 122 | /// Returns current time in microseconds. |
| 129 | std::chrono::microseconds GetGlobalTimeUs() const; | 123 | std::chrono::microseconds GetGlobalTimeUs() const; |
| 130 | 124 | ||
| @@ -142,8 +136,7 @@ private: | |||
| 142 | 136 | ||
| 143 | void Reset(); | 137 | void Reset(); |
| 144 | 138 | ||
| 145 | std::unique_ptr<Common::WallClock> cpu_clock; | 139 | std::unique_ptr<Common::WallClock> clock; |
| 146 | std::unique_ptr<Common::WallClock> event_clock; | ||
| 147 | 140 | ||
| 148 | s64 global_timer = 0; | 141 | s64 global_timer = 0; |
| 149 | 142 | ||