This commit is contained in:
lxyer 2018-12-01 17:00:40 +08:00
parent df5dba8384
commit 220ff0a3b0
2 changed files with 6 additions and 5 deletions

View File

@ -4,15 +4,16 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId> <groupId>com.lxyer</groupId>
<artifactId>redtimer</artifactId> <artifactId>redtimer</artifactId>
<version>1.0-SNAPSHOT</version> <version>0.1.0</version>
<packaging>jar</packaging>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.12</version>
<scope>compile</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -29,7 +29,7 @@ public class TimerTest {
timerExecutor.add(t1, t2); timerExecutor.add(t1, t2);
//60s后修改a1 每2s执行一次 //60s后修改a1 每2s执行一次
Thread.sleep(1000 * 60); Thread.sleep(1000);
//task = timerExecutor.get("a1"); //task = timerExecutor.get("a1");
if (t1 != null){ if (t1 != null){
t1.setScheduled(new ScheduledCycle(2000 * 1)); t1.setScheduled(new ScheduledCycle(2000 * 1));
@ -37,7 +37,7 @@ public class TimerTest {
} }
Thread.sleep(1500_000000); Thread.sleep(5000);
} }
/** /**