From 15b65c4896fd6fc6e3777c6a9690937f3bbd1be3 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 10 Oct 2018 01:00:26 +0200 Subject: [PATCH] Added utils plugin --- platypush/plugins/utils.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 platypush/plugins/utils.py diff --git a/platypush/plugins/utils.py b/platypush/plugins/utils.py new file mode 100644 index 000000000..f16277906 --- /dev/null +++ b/platypush/plugins/utils.py @@ -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: +