Merge pull request #89 from ticktronaut/some_fixes

Fixed buggy spawning of os.time().
This commit is contained in:
streetturtle 2019-09-01 21:45:07 -04:00 committed by GitHub
commit 7dc7ab5ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ watch("acpi -i", 10,
batteryType = "battery-empty%s-symbolic" batteryType = "battery-empty%s-symbolic"
if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then
-- if 5 minutes have elapsed since the last warning -- if 5 minutes have elapsed since the last warning
last_battery_check = time() last_battery_check = os.time()
show_battery_warning() show_battery_warning()
end end