Class Ticker
- Superclasses :
-
lang::Object
util::Connectable
- Package :
- gui
This class is used to generate "tick" events
at regular intervals. These events will be fired
between the handling of input and repaint events,
so at least one dialog has to be open for the
Ticker class to work.
The following will cause the method on_tick of object
obj to be invoked roughly every 2 seconds.
- Example :
t := Ticker()
t.connect(obj, "on_tick", TICK_EVENT)
t.start(2000)
- Source
Variables inherited from util::Connectable |
listeners
|
is_ticking()
-
Succeeds if and only if the ticker is active.
- Source
retime(n)
-
Change the interval of the ticker
- Parameters :
- n - the new interval.
- Source
start(n, d)
-
Start the ticker process, with the tick()
method being invoked approximately every n milliseconds.
- Parameters :
- n - the ticker interval in milliseconds.
- d - the initial delay, if any (default 0)
- Source
stop()
-
Stop the ticker.
- Source
tick()
-
This method is called repeatedly by the dispatcher. It
fires off events to its listeners.
- Source
next_tick_time
-
ticker_rate
-