public final class ZTicker extends Object
Tickets can be added with a given delay in milliseconds,
when the delay expires after addition,
handler method is executed with given arguments.
Ticket is NOT repetitive and will be executed once unless canceled.
Timers can be added with a given interval in milliseconds,
when the interval of time expires after addition,
handler method is executed with given arguments.
Timer is repetitive and will be executed over time until canceled.
This is a DRAFT class, and may change without notice.
| Constructor and Description |
|---|
ZTicker() |
| Modifier and Type | Method and Description |
|---|---|
ZTicket.Ticket |
addTicket(long interval,
TimerHandler handler,
Object... args) |
ZTimer.Timer |
addTimer(long interval,
TimerHandler handler,
Object... args) |
int |
execute() |
long |
timeout() |
public ZTicket.Ticket addTicket(long interval, TimerHandler handler, Object... args)
public ZTimer.Timer addTimer(long interval, TimerHandler handler, Object... args)
public long timeout()
public int execute()
Copyright © 2020. All rights reserved.