Sample CPU telemetry every quarter second
This commit is contained in:
+3
-3
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user