2014-12-01 18:27:20 +01:00
|
|
|
from senpy.plugins import SenpyPlugin
|
2016-02-19 19:24:09 +01:00
|
|
|
from senpy.models import Results
|
2014-12-01 18:27:20 +01:00
|
|
|
from time import sleep
|
|
|
|
|
2015-02-24 07:15:25 +01:00
|
|
|
|
2014-12-01 18:27:20 +01:00
|
|
|
class SleepPlugin(SenpyPlugin):
|
2015-02-24 07:15:25 +01:00
|
|
|
|
2014-12-01 18:27:20 +01:00
|
|
|
def activate(self, *args, **kwargs):
|
|
|
|
sleep(self.timeout)
|
2015-02-23 02:13:31 +01:00
|
|
|
|
|
|
|
def analyse(self, *args, **kwargs):
|
2015-04-26 21:08:36 +02:00
|
|
|
sleep(float(kwargs.get("timeout", self.timeout)))
|
2016-02-19 19:24:09 +01:00
|
|
|
return Results()
|