aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-01 10:16:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-01 10:16:58 +1300
commit8550dc61aa70fea96cc73fc57969b8e0c4fab339 (patch)
treec07b1b7ac5c4f56e87e667a7d85ada48907fb821 /src/org/traccar/database/DataManager.java
parent9034cd07e95320a37a0f788ee6eaa546af5f4df1 (diff)
downloadtrackermap-server-8550dc61aa70fea96cc73fc57969b8e0c4fab339.tar.gz
trackermap-server-8550dc61aa70fea96cc73fc57969b8e0c4fab339.tar.bz2
trackermap-server-8550dc61aa70fea96cc73fc57969b8e0c4fab339.zip
Replace object with system method
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 7bcfeac31..27d03ca08 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -119,7 +119,7 @@ public class DataManager implements IdentityManager {
@Override
public Device getDeviceByUniqueId(String uniqueId) throws SQLException {
- if ((new Date().getTime() - devicesLastUpdate > devicesRefreshDelay) || !devicesByUniqueId.containsKey(uniqueId)) {
+ if ((System.currentTimeMillis() - devicesLastUpdate > devicesRefreshDelay) || !devicesByUniqueId.containsKey(uniqueId)) {
devicesById.clear();
devicesByUniqueId.clear();
@@ -127,7 +127,7 @@ public class DataManager implements IdentityManager {
devicesById.put(device.getId(), device);
devicesByUniqueId.put(device.getUniqueId(), device);
}
- devicesLastUpdate = new Date().getTime();
+ devicesLastUpdate = System.currentTimeMillis();
}
return devicesByUniqueId.get(uniqueId);