| java.lang.Object com.google.gwt.user.client.Timer
Timer | abstract public class Timer (Code) | | A simplified, browser-safe timer class. This class serves the same purpose as
java.util.Timer, but is simplified because of the single-threaded
environment.
To schedule a timer, simply create a subclass of it (overriding
Timer.run )
and call
Timer.schedule or
Timer.scheduleRepeating .
Example
|
Method Summary | |
public void | cancel() Cancels this timer. | final void | fire() | abstract public void | run() This method will be called when a timer fires. | public void | schedule(int delayMillis) Schedules a timer to elapse in the future. | public void | scheduleRepeating(int periodMillis) Schedules a timer that elapses repeatedly. |
cancel | public void cancel()(Code) | | Cancels this timer.
|
run | abstract public void run()(Code) | | This method will be called when a timer fires. Override it to implement the
timer's logic.
|
schedule | public void schedule(int delayMillis)(Code) | | Schedules a timer to elapse in the future.
Parameters: delayMillis - how long to wait before the timer elapses, inmilliseconds |
scheduleRepeating | public void scheduleRepeating(int periodMillis)(Code) | | Schedules a timer that elapses repeatedly.
Parameters: periodMillis - how long to wait before the timer elapses, inmilliseconds, between each repetition |
|
|