smapi: round remaining hour estimation

This commit is contained in:
Oleg Hahm 2015-05-17 22:58:52 +02:00 committed by copycat-killer
parent 312017f369
commit ea7b0dd6b1

View file

@ -87,7 +87,7 @@ function smapi:battery(name)
return "N/A" return "N/A"
end end
local hrs = mins_left / 60 local hrs = math.floor(mins_left / 60)
local min = mins_left % 60 local min = mins_left % 60
return string.format("%02d:%02d", hrs, min) return string.format("%02d:%02d", hrs, min)
end end