📄 scheduler.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package cn.haha.time;//import cn.zami.backup.util.MyUtil;import java.util.Date;import java.util.Timer;import java.util.TimerTask;/** * * @author tzy */public class Scheduler { private final Timer timer = new Timer(); private long period = 1000*60*5; TimerTask task; public Scheduler(){ } public void cancel(){ if(this.task != null) this.task.cancel(); } public void scheduler(TimerTask task,Date firstTime,long period){// MyUtil.println("scheduler--->starting..."); this.task = task; this.period = period; timer.schedule(task, firstTime, period); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -