From a0c3a46aa9d2186e833bdc1872f9eb877230b429 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 5 Aug 2018 22:07:28 -0400 Subject: core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds Enforces the time unit being returned and also allows using the standard time utilities to manipulate it. --- src/core/core_timing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/core_timing.cpp') diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index a1b6f96f1..9c934478b 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -226,8 +226,8 @@ void Idle() { downcount = 0; } -u64 GetGlobalTimeUs() { - return GetTicks() * 1000000 / BASE_CLOCK_RATE; +std::chrono::microseconds GetGlobalTimeUs() { + return std::chrono::microseconds{GetTicks() * 1000000 / BASE_CLOCK_RATE}; } int GetDowncount() { -- cgit v1.2.3