summaryrefslogtreecommitdiffstats
path: root/src/core/core_timing_util.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-02-15 18:15:28 +0100
committerFernandoS27 <fsahmkow27@gmail.com>2019-02-16 03:55:29 +0100
commit5b7ec71fb7cc81ea0f98f019cb0dac0b6bcb2fa2 (patch)
treef4bd6af64dd1200dd12a4dd9e55f4920b8a8a8cf /src/core/core_timing_util.h
parentMerge pull request #2123 from lioncash/coretiming-global (diff)
downloadyuzu-5b7ec71fb7cc81ea0f98f019cb0dac0b6bcb2fa2.tar
yuzu-5b7ec71fb7cc81ea0f98f019cb0dac0b6bcb2fa2.tar.gz
yuzu-5b7ec71fb7cc81ea0f98f019cb0dac0b6bcb2fa2.tar.bz2
yuzu-5b7ec71fb7cc81ea0f98f019cb0dac0b6bcb2fa2.tar.lz
yuzu-5b7ec71fb7cc81ea0f98f019cb0dac0b6bcb2fa2.tar.xz
yuzu-5b7ec71fb7cc81ea0f98f019cb0dac0b6bcb2fa2.tar.zst
yuzu-5b7ec71fb7cc81ea0f98f019cb0dac0b6bcb2fa2.zip
Diffstat (limited to 'src/core/core_timing_util.h')
-rw-r--r--src/core/core_timing_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/core_timing_util.h b/src/core/core_timing_util.h
index 513cfac1b..545d3a260 100644
--- a/src/core/core_timing_util.h
+++ b/src/core/core_timing_util.h
@@ -11,6 +11,7 @@ namespace Core::Timing {
// The below clock rate is based on Switch's clockspeed being widely known as 1.020GHz
// The exact value used is of course unverified.
constexpr u64 BASE_CLOCK_RATE = 1019215872; // Switch clock speed is 1020MHz un/docked
+constexpr u64 CNTFREQ = 19200000; // Value from fusee.
inline s64 msToCycles(int ms) {
// since ms is int there is no way to overflow
@@ -61,4 +62,6 @@ inline u64 cyclesToMs(s64 cycles) {
return cycles * 1000 / BASE_CLOCK_RATE;
}
+u64 CpuCyclesToClockCycles(u64 ticks);
+
} // namespace Core::Timing