这是代码片段:
Timer t = new Timer();
TimerTask task = new TimerTask() {
@Override
public void run() {
//change the timer rate of scheduleAtFixedRate here
}
};
//every 10 sec
t.scheduleAtFixedRate(task, new Date(), 10000);
谁能告诉我如何将计时器的速率从实例更改为t.scheduleAtFixedRate(task, new Date(), 30000)
in 方法?run
TimerTask
非常感谢!