mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-13 06:50:54 +01:00
12 lines
183 B
C
12 lines
183 B
C
#include "uptime.h"
|
|
|
|
#include <sys/sysinfo.h>
|
|
|
|
uint64_t ffDetectUptime()
|
|
{
|
|
struct sysinfo info;
|
|
if(sysinfo(&info) != 0)
|
|
return 0;
|
|
return (uint32_t) info.uptime;
|
|
}
|