aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Main.java')
-rw-r--r--src/org/traccar/Main.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/org/traccar/Main.java b/src/org/traccar/Main.java
index e7e8d8ab9..e992691ad 100644
--- a/src/org/traccar/Main.java
+++ b/src/org/traccar/Main.java
@@ -23,8 +23,8 @@ import java.util.TimerTask;
import java.util.Locale;
public final class Main {
- static final long CLEAN_DELAY = 0;
- static final long CLEAN_PERIOD = 24 * 60 * 60 * 1000;
+
+ private static final long CLEAN_PERIOD = 24 * 60 * 60 * 1000;
private Main() {
}
@@ -40,8 +40,7 @@ public final class Main {
Context.getWebServer().start();
}
- Timer timer = new Timer();
- timer.scheduleAtFixedRate(new TimerTask() {
+ new Timer().scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
try {
@@ -50,7 +49,7 @@ public final class Main {
Log.warning(error);
}
}
- }, CLEAN_DELAY, CLEAN_PERIOD);
+ }, 0, CLEAN_PERIOD);
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override