瀏覽代碼

Removed #define for update interval

Debugging #define, especially in mathematical constructs is very
difficult. The performance overhead of static const int is negligible.
master
Aaron Marcher 7 年之前
父節點
當前提交
be12b6b350
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 74B048E5C2474F9A
共有 2 個檔案被更改,包括 3 行新增3 行删除
  1. +1
    -1
      config.def.h
  2. +2
    -2
      slstatus.c

+ 1
- 1
config.def.h 查看文件

@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */

/* how often to update the statusbar (min value == 1) */
#define UPDATE_INTERVAL 1
static const int update_interval = 1;

/* text to show if no value can be retrieved */
#define UNKNOWN_STR "n/a"


+ 2
- 2
slstatus.c 查看文件

@@ -914,11 +914,11 @@ main(int argc, char *argv[])
XSync(dpy, False);
}

if ((UPDATE_INTERVAL - delay) <= 0) {
if ((update_interval - delay) <= 0) {
delay = 0;
continue;
} else {
sleep(UPDATE_INTERVAL - delay);
sleep(update_interval - delay);
delay = 0;
}
}


Loading…
取消
儲存