diff options
| author | Mai <mathew1800@gmail.com> | 2022-08-03 14:30:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-03 14:30:29 -0400 |
| commit | a8b2174ce670de151bd991e6bfa89438d8ff0185 (patch) | |
| tree | bc5110b1796e293276ce21511bd84578d91e665b /Source/Core/Common/Profiler.cpp | |
| parent | 173337104f9001c2d186db9303ea34652a94c191 (diff) | |
| parent | fec61f89a3bce9bf857a15ed4789629624e66584 (diff) | |
Merge pull request #10872 from shuffle2/timer
Timer improvements
Diffstat (limited to 'Source/Core/Common/Profiler.cpp')
| -rw-r--r-- | Source/Core/Common/Profiler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<u32>(s_max_length, u32(m_name.length())); std::lock_guard<std::mutex> 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; |
