def _pause(self): d = Block._pause(self) complete = self._c.func # i.e. _done self._c.cancel() remaining = self._c.getTime() - now() self._pauseTime = now() def on_resume(): self._delay += now() - self._pauseTime self._c = reactor.callLater(remaining, complete) # TODO: announce new delay of round(self._delay, 4)) self._onResume = on_resume return d
def getReferencedVariableNames(self): name, attr = variableName(self.getFieldValue('VAR', '')) return Block.getReferencedVariableNames( self, [name] if not self.disabled else [])
def getReferencedVariables(self): variable = self._getVariable() return Block.getReferencedVariables( self, [variable] if not self.disabled and variable is not None else [])
def getGlobalDeclarationNames(self): name = self._varName() return Block.getGlobalDeclarationNames( self, [name] if not self.disabled else [])
def _reset(self): return Block._reset(self) self._c = None self._start = 0 self._delay = 0
def __init__(self, workspace, id): Block.__init__(self, workspace, id) self._c = None self._start = 0 self._delay = 0