mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-16 04:33:57 -07:00
use all 3 load values
This commit is contained in:
@@ -41,12 +41,12 @@ int main(void) {
|
|||||||
time_t pdttime;
|
time_t pdttime;
|
||||||
struct tm *pdtrealtime;
|
struct tm *pdtrealtime;
|
||||||
|
|
||||||
double load;
|
double load[3];
|
||||||
|
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
getloadavg(&load, 1);
|
getloadavg(load, 3);
|
||||||
|
|
||||||
epochtime = time(NULL);
|
epochtime = time(NULL);
|
||||||
realtime = localtime(&epochtime);
|
realtime = localtime(&epochtime);
|
||||||
@@ -58,7 +58,8 @@ int main(void) {
|
|||||||
strftime(c, sizeof(c), TIME_FORMAT2, pdtrealtime);
|
strftime(c, sizeof(c), TIME_FORMAT2, pdtrealtime);
|
||||||
unsetenv("TZ");
|
unsetenv("TZ");
|
||||||
|
|
||||||
fprintf(stdout, "%s | %s | %.2f | xmonad 0.3 \n", b, c, load);
|
fprintf(stdout, "%s | %s | %.2f %.2f %.2f | xmonad 0.3 \n", b, c, load[0], load[1], load[2]);
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
sleep(REFRESH_RATE);
|
sleep(REFRESH_RATE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user