removed UPDATE_INTERVAL, it is neat to have it but removing it is a tradeoff worth...
authorAli H. Fardan <raiz@firemail.cc>
Sat, 3 Sep 2016 18:43:05 +0000 (21:43 +0300)
committerAli H. Fardan <raiz@firemail.cc>
Sat, 3 Sep 2016 18:43:05 +0000 (21:43 +0300)
config.def.h
slstatus.c

index 011acc7c11b6ae970266d33ce20acdcb8a7440a8..ded771a3ed5bc479c48df41fa4596eb1396979d4 100644 (file)
@@ -8,9 +8,6 @@
 #define BATTERY_NOW    "energy_now"
 #define BATTERY_FULL   "energy_full_design"
 
-/* bar update interval in seconds (smallest value = 1) */
-#define UPDATE_INTERVAL        1
-
 /* text to show if no value can be retrieved */
 #define UNKNOWN_STR    "n/a"
 
index 2e57fbb048ca791baf2fb83cb958d488bb06ccba..ab461c8c4381b80e9cfaf0268e047f2457d08a96 100644 (file)
@@ -147,7 +147,6 @@ cpu_perc(void)
        fscanf(fp, "%*s %Lf %Lf %Lf %Lf", &a[0], &a[1], &a[2], &a[3]);
        fclose(fp);
 
-       /* wait a second (for avg values) */
        sleep(1);
 
        fp = fopen("/proc/stat","r");
@@ -637,7 +636,6 @@ main(void)
 
                XStoreName(dpy, DefaultRootWindow(dpy), status_string);
                XSync(dpy, False);
-               sleep(UPDATE_INTERVAL -1);
        }
 
        /* NOT REACHED */