[core] Switch update interval parameter to seconds
As correctly pointed out by @rrhuffy, restricting update intervals to minutes is pretty arbitrary. Therefore, change logic to specify updates intervals in *seconds*. Also, to maintain backwards compatibility for users that already have custom intervals in their config, allow a module to specify their own "factor" for intervals. So a module that expects the interval to be in minutes can set the factor to 60.
This commit is contained in:
parent
45e7574ef8
commit
621564d247
7 changed files with 11 additions and 1 deletions
|
@ -42,6 +42,7 @@ class Module(bumblebee.engine.Module):
|
|||
self._showcity = bumblebee.util.asbool(self.parameter("showcity", True))
|
||||
self._unit = self.parameter("unit", "metric")
|
||||
self._valid = False
|
||||
self.interval_factor(60)
|
||||
self.interval(15)
|
||||
|
||||
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, cmd=self._next_location)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue