public interface Timer
TimerTasks for one-time future execution in a background
thread.| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
isStop()
Is stop boolean.
|
Timeout |
newTimeout(TimerTask task,
long delay,
TimeUnit unit)
Schedules the specified
TimerTask for one-time execution after
the specified delay. |
Set<Timeout> |
stop()
Releases all resources acquired by this
Timer and cancels all
tasks which were scheduled but not executed yet. |
Timeout newTimeout(TimerTask task, long delay, TimeUnit unit)
TimerTask for one-time execution after
the specified delay.task - timeTaskdelay - delay time;unit - time unit;IllegalStateException - if this timer has been stopped alreadySet<Timeout> stop()
Timer and cancels all
tasks which were scheduled but not executed yet.boolean isStop()
Copyright © 2022 dromara. All rights reserved.