class documentation
class DelayedCall: (source)
Constructor: DelayedCall(time, func, args, kw, ...)
Implements interfaces: twisted.internet.interfaces.IDelayedCall
Undocumented
Method | __init__ |
No summary |
Method | __le__ |
Implement <= operator between two DelayedCall instances. |
Method | __lt__ |
Implement < operator between two DelayedCall instances. |
Method | __repr__ |
Implement repr() for DelayedCall instances. |
Method | activate |
Undocumented |
Method | active |
Determine whether this call is still pending |
Method | cancel |
Unschedule this call |
Method | delay |
Reschedule this call for a later time |
Method | get |
Return the time at which this call will fire |
Method | reset |
Reschedule this call for a different time |
Class Variable | debug |
Undocumented |
Instance Variable | args |
Undocumented |
Instance Variable | called |
Undocumented |
Instance Variable | cancelled |
Undocumented |
Instance Variable | canceller |
Undocumented |
Instance Variable | creator |
Undocumented |
Instance Variable | delayed |
Undocumented |
Instance Variable | func |
Undocumented |
Instance Variable | kw |
Undocumented |
Instance Variable | resetter |
Undocumented |
Instance Variable | seconds |
Undocumented |
Instance Variable | time |
Undocumented |
Class Variable | _repr |
Undocumented |
def __init__(self, time:
float
, func: Callable[ ..., Any]
, args: Sequence[ object]
, kw: Dict[ str, object]
, cancel: Callable[ [ DelayedCall], None]
, reset: Callable[ [ DelayedCall], None]
, seconds: Callable[ [], float]
= runtimeSeconds):
(source)
¶
Parameters | |
time:float | Seconds from the epoch at which to call func. |
func:Callable[ | The callable to call. |
args:Sequence[ | The positional arguments to pass to the callable. |
kw:Dict[ | The keyword arguments to pass to the callable. |
cancel:Callable[ | A callable which will be called with this DelayedCall before cancellation. |
reset:Callable[ | A callable which will be called with this DelayedCall after changing this DelayedCall's scheduled execution time. The callable should adjust any necessary scheduling details to ensure this DelayedCall is invoked at the new appropriate time. |
seconds:Callable[ | If provided, a no-argument callable which will be used to determine the current time any time that information is needed. |
Implement <= operator between two DelayedCall
instances.
Comparison is based on the time attribute (unadjusted by the delayed time).
Implement < operator between two DelayedCall
instances.
Comparison is based on the time attribute (unadjusted by the delayed time).
Determine whether this call is still pending
Returns | |
bool | True if this call has not yet been made or cancelled, False otherwise. |
Unschedule this call
Raises | |
AlreadyCancelled | Raised if this call has already been unscheduled. |
AlreadyCalled | Raised if this call has already been made. |
Reschedule this call for a later time
Parameters | |
secondsfloat | The number of seconds after the originally scheduled time for which to reschedule this call. |
Raises | |
AlreadyCancelled | Raised if this call has been cancelled. |
AlreadyCalled | Raised if this call has already been made. |
Return the time at which this call will fire
Returns | |
float | The number of seconds after the epoch at which this call is scheduled to be made. |
Reschedule this call for a different time
Parameters | |
secondsfloat | The number of seconds from the time of the reset call at which this call will be scheduled. |
Raises | |
AlreadyCancelled | Raised if this call has been cancelled. |
AlreadyCalled | Raised if this call has already been made. |