From fc7bd61576419af38244b10f72d78a6570df0226 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 3 Mar 2023 22:18:08 +0100 Subject: [PATCH] Calculate CPU data percentages relative to active time span. --- server/TracyView_CpuData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView_CpuData.cpp b/server/TracyView_CpuData.cpp index 2f15fb69..e1064e67 100644 --- a/server/TracyView_CpuData.cpp +++ b/server/TracyView_CpuData.cpp @@ -525,7 +525,7 @@ void View::DrawCpuDataWindow() } const auto thisPid = m_worker.GetPid(); - const auto rtimespan = 1.0 / m_worker.GetLastTime(); + const auto rtimespan = 1.0 / ( m_worker.GetLastTime() - m_worker.GetFirstTime() ); const auto ty = ImGui::GetTextLineHeight(); auto& style = ImGui::GetStyle();