mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
@@ -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();
|
||||
|
||||
@@ -11,6 +11,8 @@ void ffPrepareDiskIO(FFDiskIOOptions* options)
|
||||
{
|
||||
if (options->detectTotal) return;
|
||||
|
||||
if (time1 != 0) return; // Already prepared
|
||||
|
||||
ffListInit(&ioCounters1, sizeof(FFDiskIOResult));
|
||||
ffDiskIOGetIoCounters(&ioCounters1, options);
|
||||
time1 = ffTimeGetNow();
|
||||
|
||||
@@ -9,6 +9,8 @@ void ffPrepareNetIO(FFNetIOOptions* options)
|
||||
{
|
||||
if (options->detectTotal) return;
|
||||
|
||||
if (time1 != 0) return; // Already prepared
|
||||
|
||||
ffListInit(&ioCounters1, sizeof(FFNetIOResult));
|
||||
ffNetIOGetIoCounters(&ioCounters1, options);
|
||||
time1 = ffTimeGetNow();
|
||||
|
||||
@@ -811,6 +811,11 @@ static void run(FFdata* data)
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
if (useJsonConfig)
|
||||
ffPrintJsonConfig(data, true /* prepare */);
|
||||
else
|
||||
ffPrepareCommandOption(data);
|
||||
}
|
||||
|
||||
if (data->resultDoc)
|
||||
|
||||
+1
-1
@@ -702,7 +702,7 @@ void ffLogoPrintLine(void)
|
||||
printf("\033[%uC", instance.state.logoWidth);
|
||||
|
||||
if (instance.state.dynamicInterval > 0)
|
||||
fputs("\033[K", stdout);
|
||||
fputs("\033[K", stdout); // Clear to the end of the line
|
||||
|
||||
++instance.state.keysHeight;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user