public abstract class Timer extends Object
run()
)
and call schedule(int)
or scheduleRepeating(int)
.Constructor and Description |
---|
Timer() |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels this timer.
|
abstract void |
run()
This method will be called when a timer fires.
|
void |
schedule(int delayMillis)
Schedules a timer to elapse in the future.
|
void |
scheduleRepeating(int periodMillis)
Schedules a timer that elapses repeatedly.
|
public void cancel()
public abstract void run()
public void schedule(int delayMillis)
delayMillis
- how long to wait before the timer elapses, in
millisecondspublic void scheduleRepeating(int periodMillis)
periodMillis
- how long to wait before the timer elapses, in
milliseconds, between each repetitionCopyright © 2018. All rights reserved.