From f78d4517069ee277be97bf908df48fbead4fc127 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Sun, 17 May 2015 22:58:52 +0200 Subject: [PATCH 1/1] smapi: round remaining hour estimation --- widgets/contrib/tpbat/smapi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/contrib/tpbat/smapi.lua b/widgets/contrib/tpbat/smapi.lua index 862d4cd..c7f093e 100644 --- a/widgets/contrib/tpbat/smapi.lua +++ b/widgets/contrib/tpbat/smapi.lua @@ -87,7 +87,7 @@ function smapi:battery(name) return "N/A" end - local hrs = mins_left / 60 + local hrs = math.floor(mins_left / 60) local min = mins_left % 60 return string.format("%02d:%02d", hrs, min) end -- 2.39.5