public static final class Timers.Timer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
alive |
private java.lang.Object[] |
args |
private Timers.Handler |
handler |
private long |
interval |
private Timers |
parent |
Modifier | Constructor and Description |
---|---|
private |
Timer(Timers parent,
long interval,
Timers.Handler handler,
java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancels a timer.
|
boolean |
reset()
Reset the timer.
|
boolean |
setInterval(long interval)
Changes the interval of the timer.
|
private final Timers parent
private long interval
private boolean alive
private final Timers.Handler handler
private final java.lang.Object[] args
private Timer(Timers parent, long interval, Timers.Handler handler, java.lang.Object... args)
public boolean setInterval(long interval)
interval
- the new interval of the timer.public boolean reset()
public boolean cancel()