1. ZyX_I
  2. aurum

Source

aurum / python / aurum / repeatedcmd.py

Diff from to

File python/aurum/repeatedcmd.py

  • Ignore whitespace
     resume  = start
     __del__ = stop
 
+class RepeatedCmdSynchronized(object):
+    def __init__(self, interval, func, *args, **kwargs):
+        self.args   = args
+        self.kwargs = kwargs
+        self.func   = func
+
+    def getvalue(self):
+        return self.func(*self.args, **self.kwargs)
+
+    getcurrentvalue = getvalue
+
+    @staticmethod
+    def dummy():
+        pass
+
+    stop = dummy
+    pause = dummy
+    resume = dummy
+
+# RepeatedCmd = RepeatedCmdSynchronized
+
 processes={}
 
 thcount=0