[modules/various] Use new interval mechanism

Use generic interval mechanism in most of the modules that use slow
updates.

Only exception: getcrypto, as the interval is specified in seconds there
and I want to retain backwards-compatibility.

fixes #220
This commit is contained in:
Tobias Witek 2018-01-07 20:27:11 +01:00
parent 776be11137
commit 3638aa2420
7 changed files with 55 additions and 79 deletions

View file

@ -6,7 +6,7 @@ Requires the following executable:
* ping
Parameters:
* ping.interval: Time in seconds between two RTT checks (defaults to 60)
* ping.ping_interval: Time in seconds between two RTT checks (defaults to 60)
* ping.address : IP address to check
* ping.timeout : Timeout for waiting for a reply (defaults to 5.0)
* ping.probes : Number of probes to send (defaults to 5)
@ -51,7 +51,7 @@ class Module(bumblebee.engine.Module):
super(Module, self).__init__(engine, config, widget)
widget.set("address", self.parameter("address", "8.8.8.8"))
widget.set("interval", self.parameter("interval", 60))
widget.set("interval", self.parameter("ping_interval", 60))
widget.set("rtt-probes", self.parameter("probes", 5))
widget.set("rtt-timeout", self.parameter("timeout", 5.0))
widget.set("rtt-avg", 0.0)