public class TimerTask extends Object
Modifier and Type | Field and Description |
---|---|
String |
desc
任务描述
|
protected TimerTask |
next
下一个节点
|
protected TimerTask |
prev
上一个节点
|
protected TimerTaskList |
timerTaskList
时间槽
|
Constructor and Description |
---|
TimerTask(Runnable task,
long delayMs)
构造
|
Modifier and Type | Method and Description |
---|---|
long |
getDelayMs()
获取延迟时间点,即创建时间+延迟时长(单位毫秒)
|
Runnable |
getTask()
获取任务
|
String |
toString() |
protected TimerTaskList timerTaskList
protected TimerTask next
protected TimerTask prev
public String desc
public TimerTask(Runnable task, long delayMs)
task
- 任务delayMs
- 延迟毫秒数(以当前时间为准)Copyright © 2024. All rights reserved.