mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 02:55:12 +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();
|
||||
info.looped = 0;
|
||||
while (terminate == 0 && (total_run_times == 0 || info.looped < total_run_times)) {
|
||||
char buf[max_user_text];
|
||||
get_battery_short_status(buf, max_user_text, "BAT0");
|
||||
if(buf[0] == 'D') {
|
||||
update_interval = update_interval_bat;
|
||||
} else {
|
||||
update_interval = update_interval_old;
|
||||
if(update_interval_bat != update_interval_old) {
|
||||
char buf[max_user_text];
|
||||
|
||||
get_battery_short_status(buf, max_user_text, "BAT0");
|
||||
if(buf[0] == 'D') {
|
||||
update_interval = update_interval_bat;
|
||||
} else {
|
||||
update_interval = update_interval_old;
|
||||
}
|
||||
}
|
||||
info.looped++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user