Sample CPU telemetry every quarter second

This commit is contained in:
2026-07-20 22:47:39 -05:00
parent 913cfe3726
commit 920092333f
+3 -3
View File
@@ -382,9 +382,9 @@ static void record_telemetry_sample(struct telemetry_monitor *monitor)
static void telemetry_sleep(void) static void telemetry_sleep(void)
{ {
#if defined(_WIN32) #if defined(_WIN32)
Sleep(100); Sleep(25);
#else #else
usleep(100000); usleep(25000);
#endif #endif
} }
@@ -398,7 +398,7 @@ static void *telemetry_entry(void *arg)
double next = monitor->started; double next = monitor->started;
while (!monitor->stop) { while (!monitor->stop) {
double current = now_seconds(); double current = now_seconds();
if (current >= next) { record_telemetry_sample(monitor); next += 1.0; } if (current >= next) { record_telemetry_sample(monitor); next += 0.25; }
telemetry_sleep(); telemetry_sleep();
} }
record_telemetry_sample(monitor); record_telemetry_sample(monitor);