blob: 3f19d61520619bbffe89dd2907f784a964952e2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package org.traccar.schedule;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
public class ScheduleManager {
private ScheduledExecutorService executor;
public void start() {
executor = Executors.newSingleThreadScheduledExecutor();
new TaskDeviceInactivityCheck().schedule(executor);
}
public void stop() {
if (executor != null) {
executor.shutdown();
executor = null;
}
}
}
|