mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-20 07:53:06 +00:00
core/core_timing_util: Amend casing of cyclesTo* functions
Makes the casing consistent with all of our general function naming conventions.
This commit is contained in:
parent
42f5fd0ab3
commit
2548661c08
3 changed files with 6 additions and 6 deletions
|
@ -18,15 +18,15 @@ s64 msToCycles(std::chrono::milliseconds ms);
|
||||||
s64 usToCycles(std::chrono::microseconds us);
|
s64 usToCycles(std::chrono::microseconds us);
|
||||||
s64 nsToCycles(std::chrono::nanoseconds ns);
|
s64 nsToCycles(std::chrono::nanoseconds ns);
|
||||||
|
|
||||||
inline std::chrono::milliseconds cyclesToMs(s64 cycles) {
|
inline std::chrono::milliseconds CyclesToMs(s64 cycles) {
|
||||||
return std::chrono::milliseconds(cycles * 1000 / BASE_CLOCK_RATE);
|
return std::chrono::milliseconds(cycles * 1000 / BASE_CLOCK_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::chrono::nanoseconds cyclesToNs(s64 cycles) {
|
inline std::chrono::nanoseconds CyclesToNs(s64 cycles) {
|
||||||
return std::chrono::nanoseconds(cycles * 1000000000 / BASE_CLOCK_RATE);
|
return std::chrono::nanoseconds(cycles * 1000000000 / BASE_CLOCK_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::chrono::microseconds cyclesToUs(s64 cycles) {
|
inline std::chrono::microseconds CyclesToUs(s64 cycles) {
|
||||||
return std::chrono::microseconds(cycles * 1000000 / BASE_CLOCK_RATE);
|
return std::chrono::microseconds(cycles * 1000000 / BASE_CLOCK_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ u32 nvhost_ctrl_gpu::GetGpuTime(const std::vector<u8>& input, std::vector<u8>& o
|
||||||
|
|
||||||
IoctlGetGpuTime params{};
|
IoctlGetGpuTime params{};
|
||||||
std::memcpy(¶ms, input.data(), input.size());
|
std::memcpy(¶ms, input.data(), input.size());
|
||||||
const auto ns = Core::Timing::cyclesToNs(Core::System::GetInstance().CoreTiming().GetTicks());
|
const auto ns = Core::Timing::CyclesToNs(Core::System::GetInstance().CoreTiming().GetTicks());
|
||||||
params.gpu_time = static_cast<u64_le>(ns.count());
|
params.gpu_time = static_cast<u64_le>(ns.count());
|
||||||
std::memcpy(output.data(), ¶ms, output.size());
|
std::memcpy(output.data(), ¶ms, output.size());
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -108,7 +108,7 @@ private:
|
||||||
LOG_DEBUG(Service_Time, "called");
|
LOG_DEBUG(Service_Time, "called");
|
||||||
|
|
||||||
const auto& core_timing = Core::System::GetInstance().CoreTiming();
|
const auto& core_timing = Core::System::GetInstance().CoreTiming();
|
||||||
const auto ms = Core::Timing::cyclesToMs(core_timing.GetTicks());
|
const auto ms = Core::Timing::CyclesToMs(core_timing.GetTicks());
|
||||||
const SteadyClockTimePoint steady_clock_time_point{static_cast<u64_le>(ms.count() / 1000),
|
const SteadyClockTimePoint steady_clock_time_point{static_cast<u64_le>(ms.count() / 1000),
|
||||||
{}};
|
{}};
|
||||||
IPC::ResponseBuilder rb{ctx, (sizeof(SteadyClockTimePoint) / 4) + 2};
|
IPC::ResponseBuilder rb{ctx, (sizeof(SteadyClockTimePoint) / 4) + 2};
|
||||||
|
@ -285,7 +285,7 @@ void Module::Interface::GetClockSnapshot(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& core_timing = Core::System::GetInstance().CoreTiming();
|
const auto& core_timing = Core::System::GetInstance().CoreTiming();
|
||||||
const auto ms = Core::Timing::cyclesToMs(core_timing.GetTicks());
|
const auto ms = Core::Timing::CyclesToMs(core_timing.GetTicks());
|
||||||
const SteadyClockTimePoint steady_clock_time_point{static_cast<u64_le>(ms.count() / 1000), {}};
|
const SteadyClockTimePoint steady_clock_time_point{static_cast<u64_le>(ms.count() / 1000), {}};
|
||||||
|
|
||||||
CalendarTime calendar_time{};
|
CalendarTime calendar_time{};
|
||||||
|
|
Loading…
Reference in a new issue