2018-07-24 10:03:24 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project / 2017 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-06-04 23:52:42 +00:00
|
|
|
#include <chrono>
|
2018-07-24 10:03:24 +00:00
|
|
|
#include "common/common_types.h"
|
|
|
|
|
2019-02-12 17:32:15 +00:00
|
|
|
namespace Core::Timing {
|
2018-07-24 10:03:24 +00:00
|
|
|
|
2019-06-04 23:52:42 +00:00
|
|
|
s64 msToCycles(std::chrono::milliseconds ms);
|
|
|
|
s64 usToCycles(std::chrono::microseconds us);
|
|
|
|
s64 nsToCycles(std::chrono::nanoseconds ns);
|
2020-10-15 18:49:45 +00:00
|
|
|
u64 msToClockCycles(std::chrono::milliseconds ms);
|
|
|
|
u64 usToClockCycles(std::chrono::microseconds us);
|
2020-02-05 23:12:27 +00:00
|
|
|
u64 nsToClockCycles(std::chrono::nanoseconds ns);
|
2020-03-28 19:23:28 +00:00
|
|
|
std::chrono::milliseconds CyclesToMs(s64 cycles);
|
|
|
|
std::chrono::nanoseconds CyclesToNs(s64 cycles);
|
|
|
|
std::chrono::microseconds CyclesToUs(s64 cycles);
|
2018-07-24 10:03:24 +00:00
|
|
|
|
2019-02-15 17:15:28 +00:00
|
|
|
u64 CpuCyclesToClockCycles(u64 ticks);
|
|
|
|
|
2019-02-12 17:32:15 +00:00
|
|
|
} // namespace Core::Timing
|