diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-03-28 20:23:28 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 17:36:01 +0200 |
commit | f5e32935ca9d1727624c86ca78aff91027caf819 (patch) | |
tree | a041186cd47fcea90880b300af3351a56fb819aa /src/core/core_timing_util.h | |
parent | Scheduler: Correct Reload/Unload (diff) | |
download | yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.gz yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.bz2 yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.lz yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.xz yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.zst yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.zip |
Diffstat (limited to 'src/core/core_timing_util.h')
-rw-r--r-- | src/core/core_timing_util.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/core/core_timing_util.h b/src/core/core_timing_util.h index b3c58447d..2ed979e14 100644 --- a/src/core/core_timing_util.h +++ b/src/core/core_timing_util.h @@ -16,18 +16,9 @@ s64 nsToCycles(std::chrono::nanoseconds ns); u64 msToClockCycles(std::chrono::milliseconds ns); u64 usToClockCycles(std::chrono::microseconds ns); u64 nsToClockCycles(std::chrono::nanoseconds ns); - -inline std::chrono::milliseconds CyclesToMs(s64 cycles) { - return std::chrono::milliseconds(cycles * 1000 / Hardware::BASE_CLOCK_RATE); -} - -inline std::chrono::nanoseconds CyclesToNs(s64 cycles) { - return std::chrono::nanoseconds(cycles * 1000000000 / Hardware::BASE_CLOCK_RATE); -} - -inline std::chrono::microseconds CyclesToUs(s64 cycles) { - return std::chrono::microseconds(cycles * 1000000 / Hardware::BASE_CLOCK_RATE); -} +std::chrono::milliseconds CyclesToMs(s64 cycles); +std::chrono::nanoseconds CyclesToNs(s64 cycles); +std::chrono::microseconds CyclesToUs(s64 cycles); u64 CpuCyclesToClockCycles(u64 ticks); |