|
@@ -1,5 +1,11 @@
|
|
|
package com.hssx.cloudmodel.constant;
|
|
|
|
|
|
+import sun.applet.Main;
|
|
|
+
|
|
|
+import java.util.concurrent.Executors;
|
|
|
+import java.util.concurrent.ScheduledExecutorService;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
+
|
|
|
/**
|
|
|
* Author: 吴涛涛
|
|
|
* Date : 2019 - 07 - 24 16:00
|
|
@@ -49,4 +55,19 @@ public class Constant {
|
|
|
public static final String TEMPERATURE_CONTENT = "温度过高";//告警类2 温度过高
|
|
|
public static final String MAIN_TAIN_TYPE = "保养计划";//告警类2 温度过高
|
|
|
public static final String MAIN_TAIN_CONTENT = "模具运行次数已达";//保养内容
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ ScheduledExecutorService pool = Executors.newSingleThreadScheduledExecutor();
|
|
|
+
|
|
|
+ System.out.println("任务开始");
|
|
|
+ for(int i=0;i<5;i++){
|
|
|
+ System.out.println("i="+i);
|
|
|
+ pool.schedule(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ System.out.println("111111111");
|
|
|
+ }
|
|
|
+ }, 5, TimeUnit.SECONDS);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|