瀏覽代碼

removed UPDATE_INTERVAL, it is neat to have it but removing it is a tradeoff worth making, because the clock would act weird if this used to work with cpu_perc().

master
Ali H. Fardan 8 年之前
父節點
當前提交
de4f20ace3
共有 2 個文件被更改,包括 0 次插入5 次删除
  1. +0
    -3
      config.def.h
  2. +0
    -2
      slstatus.c

+ 0
- 3
config.def.h 查看文件

@@ -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"



+ 0
- 2
slstatus.c 查看文件

@@ -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 */


Loading…
取消
儲存