Xinqi Bao's Git
projects
/
slstatus.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
b650c43
)
removed UPDATE_INTERVAL, it is neat to have it but removing it is a tradeoff worth...
author
Ali H. Fardan <
[email protected]
>
Sat, 3 Sep 2016 18:43:05 +0000
(21:43 +0300)
committer
Ali H. Fardan <
[email protected]
>
Sat, 3 Sep 2016 18:43:05 +0000
(21:43 +0300)
config.def.h
diff
|
blob
|
history
slstatus.c
diff
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
011acc7
..
ded771a
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-8,9
+8,6
@@
#define BATTERY_NOW "energy_now"
#define BATTERY_FULL "energy_full_design"
#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"
/* text to show if no value can be retrieved */
#define UNKNOWN_STR "n/a"
diff --git
a/slstatus.c
b/slstatus.c
index
2e57fbb
..
ab461c8
100644
(file)
--- a/
slstatus.c
+++ b/
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);
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");
sleep(1);
fp = fopen("/proc/stat","r");
@@
-637,7
+636,6
@@
main(void)
XStoreName(dpy, DefaultRootWindow(dpy), status_string);
XSync(dpy, False);
XStoreName(dpy, DefaultRootWindow(dpy), status_string);
XSync(dpy, False);
- sleep(UPDATE_INTERVAL -1);
}
/* NOT REACHED */
}
/* NOT REACHED */