mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-14 17:58:18 -05:00
(wall, native)_clock: Add GetGPUTick
Allows us to directly calculate the GPU tick without double conversion to and from the host clock tick.
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user