Xinqi Bao's Git

add update_interval
authorDaniel Walter <[email protected]>
Thu, 10 Mar 2016 10:55:42 +0000 (11:55 +0100)
committerDaniel Walter <[email protected]>
Thu, 10 Mar 2016 10:55:42 +0000 (11:55 +0100)
add a short sleep to reduce load

config.def.h
slstatus.c

index a6bba6f..afd0320 100644 (file)
@@ -17,6 +17,9 @@ static const char batteryfullfile[] = "/sys/class/power_supply/BAT0/energy_full_
 /* time */
 static const char timeformat[] = "%y-%m-%d %H:%M:%S";
 
+/* bar update interval in seconds */
+static unsigned int update_interval = 10;
+
 /* statusbar
 Possible arguments:
 - battery (battery percentage)
index 214f667..658bc79 100644 (file)
@@ -343,6 +343,7 @@ main()
         free(ram_usage);
         free(volume);
         free(wifi_signal);
+        sleep(update_interval);
     }
 
     /* close display */