Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mangohud-next/server/metrics/gpu/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ void GPU::poll() {
if (stop_thread)
break;

if (samples >= gpu_metrics_sample_count)
continue;

auto current_time = std::chrono::steady_clock::now();
delta_time_ns = current_time - previous_time;
previous_time = current_time;
Expand Down Expand Up @@ -85,9 +88,6 @@ void GPU::poll() {

samples++;

if (samples >= gpu_metrics_sample_count)
continue;

auto elapsed = std::chrono::steady_clock::now() - current_time;
if (elapsed < gpu_metrics_polling_period)
std::this_thread::sleep_for(gpu_metrics_polling_period - elapsed);
Expand Down
Loading