diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-08-05 22:07:28 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-08-05 22:07:30 -0400 |
| commit | c34ee8cf08122c60cf7fdd16613440455e6c052c (patch) | |
| tree | a8715386f729ac3b10f0862de5e8b08537495673 /src/core/core_timing.cpp | |
| parent | ee30143bf3e86fe9ae0e9835876986c786a5e718 (diff) | |
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.
Diffstat (limited to 'src/core/core_timing.cpp')
| -rw-r--r-- | src/core/core_timing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index a1b6f96f10..9c934478b8 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() { |
