forked from platypush/platypush
Added utils plugin
This commit is contained in:
parent
68aaf9cd61
commit
15b65c4896
1 changed files with 24 additions and 0 deletions
24
platypush/plugins/utils.py
Normal file
24
platypush/plugins/utils.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
import time
|
||||
|
||||
from platypush.plugins import Plugin, action
|
||||
|
||||
|
||||
class UtilsPlugin(Plugin):
|
||||
"""
|
||||
A plugin for general-purpose util methods
|
||||
"""
|
||||
|
||||
@action
|
||||
def sleep(self, seconds):
|
||||
"""
|
||||
Make the current executor sleep for the specified number of seconds.
|
||||
|
||||
:param seconds: Sleep seconds
|
||||
:type seconds: float
|
||||
"""
|
||||
|
||||
time.sleep(seconds)
|
||||
|
||||
|
||||
# vim:sw=4:ts=4:et:
|
||||
|
Loading…
Reference in a new issue