[core/output] Use string format for interval

see #609
This commit is contained in:
tobi-wan-kenobi 2020-04-30 20:18:42 +02:00
parent a8e01f0df9
commit 39d139a51b

View file

@ -5,6 +5,8 @@ import time
import core.theme import core.theme
import core.event import core.event
import util.format
def dump_json(obj): def dump_json(obj):
return obj.dict() return obj.dict()
@ -186,7 +188,7 @@ class i3(object):
if not redraw_only: if not redraw_only:
module.update_wrapper() module.update_wrapper()
if module.parameter('interval', '') != 'never': if module.parameter('interval', '') != 'never':
module.next_update = now + float(module.parameter('interval', self.__config.interval())) module.next_update = now + util.format.seconds(module.parameter('interval', self.__config.interval()))
for widget in module.widgets(): for widget in module.widgets():
self.__content[widget] = widget.full_text() self.__content[widget] = widget.full_text()