From 09089eeee0bf6022cc7681214e51546d134402ea Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 17 Jul 2022 20:43:47 -0700 Subject: Common::Timer: use chrono::steady_clock internally --- Source/Core/Common/Profiler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/Common/Profiler.cpp') diff --git a/Source/Core/Common/Profiler.cpp b/Source/Core/Common/Profiler.cpp index 6e35318668..f3903629e6 100644 --- a/Source/Core/Common/Profiler.cpp +++ b/Source/Core/Common/Profiler.cpp @@ -32,7 +32,7 @@ Profiler::Profiler(const std::string& name) : m_name(name), m_usecs(0), m_usecs_min(UINT64_MAX), m_usecs_max(0), m_usecs_quad(0), m_calls(0), m_depth(0) { - m_time = Common::Timer::GetTimeUs(); + m_time = Common::Timer::NowUs(); s_max_length = std::max(s_max_length, u32(m_name.length())); std::lock_guard lk(s_mutex); @@ -64,7 +64,7 @@ std::string Profiler::ToString() if (s_all_profilers.empty()) return ""; - u64 end = Common::Timer::GetTimeUs(); + u64 end = Common::Timer::NowUs(); s_usecs_frame = end - s_frame_time; s_frame_time = end; @@ -101,7 +101,7 @@ void Profiler::Start() { if (!m_depth++) { - m_time = Common::Timer::GetTimeUs(); + m_time = Common::Timer::NowUs(); } } @@ -109,7 +109,7 @@ void Profiler::Stop() { if (!--m_depth) { - u64 end = Common::Timer::GetTimeUs(); + u64 end = Common::Timer::NowUs(); u64 diff = end - m_time; -- cgit v1.2.3