mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Uptime: code refactor
This commit is contained in:
@@ -7,11 +7,13 @@
|
||||
|
||||
void ffPrintUptime(FFinstance* instance)
|
||||
{
|
||||
uint64_t uptime = ffDetectUptime();
|
||||
uint64_t uptime;
|
||||
|
||||
if(uptime == 0)
|
||||
const char* error = ffDetectUptime(&uptime);
|
||||
|
||||
if(error)
|
||||
{
|
||||
ffPrintError(instance, FF_UPTIME_MODULE_NAME, 0, &instance->config.uptime, "Uptime could't be detected");
|
||||
ffPrintError(instance, FF_UPTIME_MODULE_NAME, 0, &instance->config.uptime, "%s", error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user