Class t.i.t.Clock:

Part of twisted.internet.task View Source View In Hierarchy

Provide a deterministic, easily-controlled implementation of IReactorTime.callLater. This is commonly useful for writing deterministic unit tests for code which schedules events using this API.
Method __init__ Undocumented
Method seconds Pretend to be time.time(). This is used internally when an operation
Method callLater See twisted.internet.interfaces.IReactorTime.callLater.
Method advance Move time on this clock forward by the given amount and run whatever
Method pump Advance incrementally by the given set of times.
def __init__(self): (source)
Undocumented
def seconds(self): (source)
Pretend to be time.time(). This is used internally when an operation such as IDelayedCall.reset needs to determine a a time value relative to the current time.
ReturnsThe time which should be considered the current time. (type: float )
def callLater(self, when, what, *a, **kw): (source)
See twisted.internet.interfaces.IReactorTime.callLater.
def advance(self, amount): (source)
Move time on this clock forward by the given amount and run whatever pending calls should be run.
ParametersamountThe number of seconds which to advance this clock's time. (type: float )
def pump(self, timings): (source)
Advance incrementally by the given set of times.
Parameterstimings(type: iterable of float )
API Documentation for twisted, generated by pydoctor.