CPUUsage / DiskIO / NetIO: add option waitTime

This commit is contained in:
李通洲
2024-10-22 11:08:44 +08:00
parent 40b8023ff9
commit c8521b55b9
12 changed files with 95 additions and 11 deletions
+2 -2
View File
@@ -41,9 +41,9 @@ const char* ffDetectDiskIO(FFlist* result, FFDiskIOOptions* options)
return "No physical disk found";
uint64_t time2 = ffTimeGetNow();
while (time2 - time1 < 1000)
while (time2 - time1 < options->waitTime)
{
ffTimeSleep((uint32_t) (1000 - (time2 - time1)));
ffTimeSleep((uint32_t) (options->waitTime - (time2 - time1)));
time2 = ffTimeGetNow();
}