mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-14 04:32:29 +00:00
ff14925056
Moved from Yapsy again (it is not flexible enough), now we use a custom solution. The activation and deactivation of plugins is asynchronous, so that plugins that take a long time don't interfere with the rest.
11 lines
320 B
Python
11 lines
320 B
Python
from senpy.plugins import SenpyPlugin
|
|
from time import sleep
|
|
|
|
class SleepPlugin(SenpyPlugin):
|
|
def __init__(self, info, *args, **kwargs):
|
|
super(SleepPlugin, self).__init__(info, *args, **kwargs)
|
|
self.timeout = int(info["timeout"])
|
|
|
|
def activate(self, *args, **kwargs):
|
|
sleep(self.timeout)
|