6 #include "status/uptime.h"
15 int upts, uptm, upth, uptd;
17 fputs(" ^fg(#AAAAAA)up: ", stdout);
19 stlen = fileRead(stline, sizeof(stline), "/proc/uptime");
21 fputs(" ^fg(red)ERROR ", stdout);
25 /* Cut first element */
26 for(i = 0; i < stlen; i++) {
27 if (stline[i] == ' ') {
33 // Split time into days, hours, mins, secs
35 uptd = upts / (24 * 60 * 60);
36 upts -= uptd * (24 * 60 * 60);
37 upth = upts / (60 * 60);
38 upts -= upth * (60 * 60);