mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 17:18:33 +00:00
Don't do useless checks
This commit is contained in:
parent
875c7c3129
commit
381b47a0a9
15
src/conky.c
15
src/conky.c
@ -7085,12 +7085,15 @@ static void main_loop(void)
|
|||||||
next_update_time = get_time();
|
next_update_time = get_time();
|
||||||
info.looped = 0;
|
info.looped = 0;
|
||||||
while (terminate == 0 && (total_run_times == 0 || info.looped < total_run_times)) {
|
while (terminate == 0 && (total_run_times == 0 || info.looped < total_run_times)) {
|
||||||
char buf[max_user_text];
|
if(update_interval_bat != update_interval_old) {
|
||||||
get_battery_short_status(buf, max_user_text, "BAT0");
|
char buf[max_user_text];
|
||||||
if(buf[0] == 'D') {
|
|
||||||
update_interval = update_interval_bat;
|
get_battery_short_status(buf, max_user_text, "BAT0");
|
||||||
} else {
|
if(buf[0] == 'D') {
|
||||||
update_interval = update_interval_old;
|
update_interval = update_interval_bat;
|
||||||
|
} else {
|
||||||
|
update_interval = update_interval_old;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
info.looped++;
|
info.looped++;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user