1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-25 17:42:29 +00:00
senpy/tests/plugins/sleep_plugin/sleep.py

12 lines
293 B
Python
Raw Normal View History

2017-03-14 12:05:52 +00:00
from senpy.plugins import AnalysisPlugin
from time import sleep
2017-03-14 12:05:52 +00:00
class SleepPlugin(AnalysisPlugin):
def activate(self, *args, **kwargs):
sleep(self.timeout)
2015-02-23 01:13:31 +00:00
def analyse_entry(self, entry, params):
sleep(float(params.get("timeout", self.timeout)))
yield entry