package timer;
public class Timer ...{
private long interval;
// private boolean enabled;
private Task task;
private Clock clock;
public Timer(long _interval, Task _task) ...{
super();
this.interval = _interval;
// this.enabled = enabled;
this.task = _task;
clock = new Clock();
clock.start();
new Thread(new Runnable() ...{
public void run() ...{
boolean b = true;
while (b) ...{
//System.out.println(clock.getCurrTime());
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载