diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-06-09 15:57:50 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-06-09 15:57:50 -0700 |
commit | 2c82232375a16c1b3f5a62e2e5561d37a482dff9 (patch) | |
tree | 1589966abc68b322b8ead435a47d873989e96bfa /src/org/traccar/reports | |
parent | d50a27b19bfdaf503e3e569d8a642591c49e7f19 (diff) | |
download | traccar-server-2c82232375a16c1b3f5a62e2e5561d37a482dff9.tar.gz traccar-server-2c82232375a16c1b3f5a62e2e5561d37a482dff9.tar.bz2 traccar-server-2c82232375a16c1b3f5a62e2e5561d37a482dff9.zip |
Small trips calculation optimization
Diffstat (limited to 'src/org/traccar/reports')
-rw-r--r-- | src/org/traccar/reports/Trips.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/reports/Trips.java b/src/org/traccar/reports/Trips.java index eeb2f2681..966c3a817 100644 --- a/src/org/traccar/reports/Trips.java +++ b/src/org/traccar/reports/Trips.java @@ -55,7 +55,7 @@ public final class Trips { TripReport trip = new TripReport(); - long tripDuration = endTrip.getFixTime().getTime() - positions.get(startIndex).getFixTime().getTime(); + long tripDuration = endTrip.getFixTime().getTime() - startTrip.getFixTime().getTime(); long deviceId = startTrip.getDeviceId(); trip.setDeviceId(deviceId); trip.setDeviceName(Context.getIdentityManager().getDeviceById(deviceId).getName()); |