summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/svc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 8c67ada43..4c3b53a88 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -17,6 +17,7 @@
17#include "core/core.h" 17#include "core/core.h"
18#include "core/core_cpu.h" 18#include "core/core_cpu.h"
19#include "core/core_timing.h" 19#include "core/core_timing.h"
20#include "core/core_timing_util.h"
20#include "core/hle/kernel/address_arbiter.h" 21#include "core/hle/kernel/address_arbiter.h"
21#include "core/hle/kernel/client_port.h" 22#include "core/hle/kernel/client_port.h"
22#include "core/hle/kernel/client_session.h" 23#include "core/hle/kernel/client_session.h"
@@ -1777,7 +1778,9 @@ static u64 GetSystemTick(Core::System& system) {
1777 LOG_TRACE(Kernel_SVC, "called"); 1778 LOG_TRACE(Kernel_SVC, "called");
1778 1779
1779 auto& core_timing = system.CoreTiming(); 1780 auto& core_timing = system.CoreTiming();
1780 const u64 result{core_timing.GetTicks()}; 1781
1782 // Returns the value of cntpct_el0 (https://switchbrew.org/wiki/SVC#svcGetSystemTick)
1783 const u64 result{Core::Timing::CpuCyclesToClockCycles(system.CoreTiming().GetTicks())};
1781 1784
1782 // Advance time to defeat dumb games that busy-wait for the frame to end. 1785 // Advance time to defeat dumb games that busy-wait for the frame to end.
1783 core_timing.AddTicks(400); 1786 core_timing.AddTicks(400);