aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_timing.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-04-23 00:01:08 -0400
committerMorph <39850852+Morph1984@users.noreply.github.com>2023-06-07 21:44:42 -0400
commit8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf (patch)
tree2bb7be86aafe9986811758b508a7581d2efe8ac4 /src/core/core_timing.h
parentbbd502f67adb17b00b33f1b7158cfff2b2fa8a3e (diff)
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.h11
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:
return downcount;
}
- /// Returns current time in emulated CPU cycles
- u64 GetCPUTicks() const;
-
- /// Returns current time in emulated in Clock cycles
+ /// Returns the current CNTPCT tick value.
u64 GetClockTicks() const;
- /// Returns current time in nanoseconds.
- std::chrono::nanoseconds GetCPUTimeNs() const;
-
/// Returns current time in microseconds.
std::chrono::microseconds GetGlobalTimeUs() const;
@@ -142,8 +136,7 @@ private:
void Reset();
- std::unique_ptr<Common::WallClock> cpu_clock;
- std::unique_ptr<Common::WallClock> event_clock;
+ std::unique_ptr<Common::WallClock> clock;
s64 global_timer = 0;