# ``twisted`.`internet`.`base`.`DelayedCall``

class documentation

`class DelayedCall: (source)`

Implements interfaces: `twisted.internet.interfaces.IDelayedCall`

View In Hierarchy

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_delay` | 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 | `getTime` | 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_time` | Undocumented
Instance Variable | `func` | Undocumented
Instance Variable | `kw` | Undocumented
Instance Variable | `resetter` | Undocumented
Instance Variable | `seconds` | Undocumented
Instance Variable | `time` | Undocumented
Instance Variable | `_repr` | Undocumented

def __init__(self, time, func, args, kw, cancel, reset, seconds=runtimeSeconds): (source)

Parameters
time:`float` | Seconds from the epoch at which to call `func`.
func:`Callable[..., Any]` | The callable to call.
args:`Sequence[object]` | The positional arguments to pass to the callable.
kw:`Dict[str, object]` | The keyword arguments to pass to the callable.
cancel:`Callable[[DelayedCall], None]` | A callable which will be called with this DelayedCall before cancellation.
reset:`Callable[[DelayedCall], None]` | 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[[], float]` | If provided, a no-argument callable which will be used to determine the current time any time that information is needed.

def __le__(self, other): (source)

Implement `<=` operator between two `DelayedCall` instances.

Comparison is based on the `time` attribute (unadjusted by the delayed time).

Parameters
other:`object` | Undocumented
Returns
`bool` | Undocumented

def __lt__(self, other): (source)

Implement `<` operator between two `DelayedCall` instances.

Comparison is based on the `time` attribute (unadjusted by the delayed time).

Parameters
other:`object` | Undocumented
Returns
`bool` | Undocumented

def __repr__(self): (source)
Implement `repr()` for `DelayedCall` instances.

Returns
`str` | String containing details of the `DelayedCall`.

def activate_delay(self): (source)

Undocumented

def active(self): (source)
from `twisted.internet.interfaces.IDelayedCall`
Determine whether this call is still pending

Returns
`bool` | True if this call has not yet been made or cancelled, False otherwise.

def cancel(self): (source)
from `twisted.internet.interfaces.IDelayedCall`
Unschedule this call

Raises
`AlreadyCancelled` | Raised if this call has already been unscheduled.
`AlreadyCalled` | Raised if this call has already been made.

def delay(self, secondsLater): (source)
from `twisted.internet.interfaces.IDelayedCall`
Reschedule this call for a later time

Parameters
secondsLater:`float` | 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.

def getTime(self): (source)
from `twisted.internet.interfaces.IDelayedCall`
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.

def reset(self, secondsFromNow): (source)
from `twisted.internet.interfaces.IDelayedCall`
Reschedule this call for a different time

Parameters
secondsFromNow:`float` | 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.

debug: `bool` = (source)

Undocumented

args = (source)

Undocumented

called: `int` = (source)

Undocumented

cancelled: `int` = (source)

Undocumented

canceller = (source)

Undocumented

creator = (source)

Undocumented

delayed_time: `float` = (source)

Undocumented

func = (source)

Undocumented

kw = (source)

Undocumented

resetter = (source)

Undocumented

seconds = (source)

Undocumented

time = (source)

Undocumented

_repr = (source)

Undocumented