📄 testtimer.java
字号:
package com.idoc.timer;/** * <p>Title: IDOC Interface</p> * <p>Description: IDOC 转换器</p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: SiChuan XinHua</p> * @author Richary * @version 1.0 */import java.text.SimpleDateFormat;import java.util.Date;import com.idoc.timer.*;import com.idoc.util.GetProperty;public class TestTimer { private final Scheduler scheduler = new Scheduler(); private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); public TestTimer() { GetProperty get = new GetProperty(); get.getPropertiesData(); } public void start() { scheduler.schedule(new SchedulerTask() { public void run() { soundAlarm(); } private void soundAlarm() { System.out.println("Wake up! " + "It's " + dateFormat.format(new Date())); // Start a new thread to sound an alarm... } }, new DailyIterator(new Date(),"up"),"up"); } public static void main(String[] args) { TestTimer testTimer1 = new TestTimer(); testTimer1.start(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -