diff options
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r-- | src/org/traccar/database/DataManager.java | 4 |
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); |