diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 4acc666a..a55aae86 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -2181,6 +2181,7 @@ void Worker::GetCpuUsage( int64_t t0, double tstep, size_t num, std::vector m_data.lastTime ) break; if( time >= 0 ) { - auto it = std::lower_bound( cs.begin(), cs.end(), time, [] ( const auto& l, const auto& r ) { return (uint64_t)l.End() < (uint64_t)r; } ); + auto it = std::lower_bound( itBegin, cs.end(), time, [] ( const auto& l, const auto& r ) { return (uint64_t)l.End() < (uint64_t)r; } ); if( it == cs.end() ) break; if( it->IsEndValid() && it->Start() <= time ) { @@ -2201,6 +2202,7 @@ void Worker::GetCpuUsage( int64_t t0, double tstep, size_t num, std::vectorsecond++; } } + itBegin = it; } ptr++; }