interface documentation

class IReactorTime(Interface): (source)

Known implementations: twisted.internet.base.ReactorBase, twisted.internet.task.Clock

View In Hierarchy

Time methods that a Reactor should implement.
Method call​Later Call a function later.
Method get​Delayed​Calls Retrieve all currently scheduled delayed calls.
Method seconds Get the current time in seconds.
def callLater(delay, callable, *args, **kwargs): (source)
Call a function later.
Parameters
delay:floatthe number of seconds to wait.
callable:Callable[..., Any]the callable object to call later.
*args:objectthe arguments to call it with.
**kwargs:objectthe keyword arguments to call it with.
Returns
IDelayedCallAn object which provides IDelayedCall and can be used to cancel the scheduled call, by calling its cancel() method. It also may be rescheduled by calling its delay() or reset() methods.
def getDelayedCalls(): (source)
Retrieve all currently scheduled delayed calls.
Returns
List[IDelayedCall]A list of IDelayedCall providers representing all currently scheduled calls. This is everything that has been returned by callLater but not yet called or cancelled.
def seconds(): (source)
Get the current time in seconds.
Returns
floatA number-like object of some sort.