mirror of https://github.com/gsi-upm/senpy
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
287 B
Python
12 lines
287 B
Python
10 years ago
|
from senpy.plugins import SenpyPlugin
|
||
|
from time import sleep
|
||
|
|
||
9 years ago
|
|
||
10 years ago
|
class SleepPlugin(SenpyPlugin):
|
||
|
def activate(self, *args, **kwargs):
|
||
|
sleep(self.timeout)
|
||
9 years ago
|
|
||
7 years ago
|
def analyse_entry(self, entry, params):
|
||
|
sleep(float(params.get("timeout", self.timeout)))
|
||
|
yield entry
|