diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 68ecc840..40c0b5c9 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1782,6 +1782,8 @@ void Worker::GetCpuUsageAtTime( int64_t time, int& own, int& other ) const } #endif + int cntOwn = 0; + int cntOther = 0; for( int i=0; iThread() ) ) == m_pid ) { - own++; + cntOwn++; } else { - other++; + cntOther++; } } } } + own = cntOwn; + other = cntOther; } const ContextSwitch* const Worker::GetContextSwitchDataImpl( uint64_t thread )