Procházet zdrojové kódy
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
před 7 roky
V databázi nebyl nalezen žádný známý klíč pro tento podpis
ID GPG klíče: 74B048E5C2474F9A
2 změnil soubory, kde provedl
3 přidání a
3 odebrání
-
config.def.h
-
slstatus.c
|
|
@@ -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" |
|
|
|
|
|
@@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|