DynamicInterval: reruns prepare code before next interval

Fixes #2152
This commit is contained in:
李通洲
2026-01-16 20:02:03 +08:00
parent 0f3db37199
commit 461552b8d0
5 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ static uint64_t startTime;
void ffPrepareCPUUsage(void)
{
assert(cpuTimes1.elementSize == 0);
if (cpuTimes1.elementSize != 0) return; // Already prepared
ffListInit(&cpuTimes1, sizeof(FFCpuUsageInfo));
ffGetCpuUsageInfo(&cpuTimes1);
startTime = ffTimeGetNow();