14 int upts, uptm, upth, uptd;
16 fputs(" ^fg(#AAAAAA)up: ", stdout);
18 stlen = fileRead(stline, sizeof(stline), "/proc/uptime");
20 fputs(" ^fg(red)ERROR ", stdout);
24 /* Cut first element */
25 for(i = 0; i < stlen; i++) {
26 if (stline[i] == ' ') {
32 // Split time into days, hours, mins, secs
34 uptd = upts / (24 * 60 * 60);
35 upts -= uptd * (24 * 60 * 60);
36 upth = upts / (60 * 60);
37 upts -= upth * (60 * 60);