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
J. Fernando Sánchez 603e086606 Fix list of plugins
Closes #17
2017-03-14 13:05:52 +01:00

12 lines
293 B
Python

from senpy.plugins import AnalysisPlugin
from time import sleep
class SleepPlugin(AnalysisPlugin):
def activate(self, *args, **kwargs):
sleep(self.timeout)
def analyse_entry(self, entry, params):
sleep(float(params.get("timeout", self.timeout)))
yield entry