summaryrefslogtreecommitdiffstats
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index 9a1d5a69a..e57bca70a 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -197,6 +197,13 @@ u64 CoreTiming::GetClockTicks() const {
return ticks;
}
+u64 CoreTiming::GetGPUTicks() const {
+ if (is_multicore) [[likely]] {
+ return clock->GetGPUTick();
+ }
+ return Common::WallClock::CNTPCTToGPUTick(ticks);
+}
+
std::optional<s64> CoreTiming::Advance() {
std::scoped_lock lock{advance_lock, basic_lock};
global_timer = GetGlobalTimeNs().count();