diff options
author | ninioe <ninioe@gmail.com> | 2016-08-01 16:12:47 +0300 |
---|---|---|
committer | ninioe <ninioe@gmail.com> | 2016-08-01 16:12:47 +0300 |
commit | 94781fa3ba35e494e309aee19a5e15c14d3193c1 (patch) | |
tree | a1e4a90e9a2fce3db8bc51981aeb8a23cced5e6d /src/org/traccar/Main.java | |
parent | b4841fa0a6293c0b895cf6bb65c6c2d871c78397 (diff) | |
parent | e177e7d083a4dd3f64172802661bf658d26d1163 (diff) | |
download | trackermap-server-94781fa3ba35e494e309aee19a5e15c14d3193c1.tar.gz trackermap-server-94781fa3ba35e494e309aee19a5e15c14d3193c1.tar.bz2 trackermap-server-94781fa3ba35e494e309aee19a5e15c14d3193c1.zip |
Merge remote-tracking branch 'refs/remotes/tananaev/master'
Diffstat (limited to 'src/org/traccar/Main.java')
-rw-r--r-- | src/org/traccar/Main.java | 9 |
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 |