ZTimer instead@Deprecated public final class ZTimer extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ZTimer.Handler
Deprecated.
use
TimerHandler instead |
static class |
ZTimer.Timer
Deprecated.
use
ZTimer.Timer instead |
| Constructor and Description |
|---|
ZTimer()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
ZTimer.Timer |
add(long interval,
ZTimer.Handler handler,
Object... args)
Deprecated.
Add timer to the set, timer repeats forever, or until cancel is called.
|
boolean |
cancel(ZTimer.Timer timer)
Deprecated.
use
ZTimer.Timer.cancel() instead |
int |
execute()
Deprecated.
Execute the timers.
|
boolean |
reset(ZTimer.Timer timer)
Deprecated.
use
ZTimer.Timer.reset() instead |
boolean |
setInterval(ZTimer.Timer timer,
long interval)
Deprecated.
use
ZTimer.Timer.setInterval(long) instead |
int |
sleepAndExecute()
Deprecated.
Sleeps until at least one timer can be executed and execute the timers.
|
long |
timeout()
Deprecated.
Returns the time in millisecond until the next timer.
|
public ZTimer.Timer add(long interval, ZTimer.Handler handler, Object... args)
interval - the interval of repetition in milliseconds.handler - the callback called at the expiration of the timer.args - the optional arguments for the handler.@Deprecated public boolean setInterval(ZTimer.Timer timer, long interval)
ZTimer.Timer.setInterval(long) insteadtimer - the timer to change the interval to.@Deprecated public boolean reset(ZTimer.Timer timer)
ZTimer.Timer.reset() insteadtimer - the timer to reset.@Deprecated public boolean cancel(ZTimer.Timer timer)
ZTimer.Timer.cancel() insteadtimer - the timer to cancel.public long timeout()
public int execute()
public int sleepAndExecute()
Copyright © 2020. All rights reserved.