📄 timerservice.java
字号:
/*
* Created on 2004-8-6
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.gctech.misc.other.time;
import java.util.Timer;
public class TimerService {
public static final long p = 1000 * 60 * 60;
Timer timer = new Timer(false);
TimerSchedule schedule = null;
public TimerService() {
}
public void start() throws Exception {
schedule = new TimerSchedule();
schedule.addTimerJob(new TimerJobSub());
//add other job here
timer.schedule(schedule, 0, p);
}
public void stop() throws Exception {
timer.cancel();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -