wx.CallLater

Inheritance diagram for wx.CallLater:



Description

A convenience class for wx.Timer, that calls the given callable object once after the given amount of milliseconds, passing any positional or keyword args. The return value of the callable is available after it has been run with the GetResult method.

If you don’t need to get the return value or restart the timer then there is no need to hold a reference to this object. It will hold a reference to itself while the timer is running (the timer has a reference to Notify) but the cycle will be broken when the timer completes, automatically cleaning up the wx.CallLater object.

See also

wx.CallAfter

Known Subclasses

wx.FutureCall

Properties Summary

Class API

Methods

__init__(millis, callable, *args, **kwargs)

Constructor.

Parameters:

  • millis (int)
  • callable (PyObject)

Returns:

wx.CallLater


GetInterval()

Returns the timer interval in milliseconds.


Returns:

int


GetResult()

The return value of the callable.


Returns:

PyObject


HasRun()

Returns whether the timer has ever been run.


Returns:

bool


IsRunning()

Returns whether the timer is running.


Returns:

bool


Notify()
The timer has expired so call the callable.

Restart(millis, *args, **kwargs)

Restart the timer.

Parameters:

  • millis (int)

SetArgs(*args, **kwargs)

(Re)set the args passed to the callable object.

This is useful in conjunction with Restart if you want to schedule a new call to the same callable object but with different parameters.


Start(millis=None, *args, **kwargs)

(Re)start the timer.

Parameters:

  • millis (int)

Stop()
Stop and destroy the timer.

Properties

Interval
See GetInterval
Result
See GetResult