X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FSelection.java;fp=tim%2Fprune%2Fdata%2FSelection.java;h=7b63d70838e660c9af142aa1b341f5c2bd40ccce;hp=68654e8ed35d204dc41cf3977e23ba0b67f5a15f;hb=ff33ebba6b7c62834f6dae16ce33eb2c710b160e;hpb=0a2480df5845e2d7190dfdec9b2653b1609e853d diff --git a/tim/prune/data/Selection.java b/tim/prune/data/Selection.java index 68654e8..7b63d70 100644 --- a/tim/prune/data/Selection.java +++ b/tim/prune/data/Selection.java @@ -17,7 +17,7 @@ public class Selection private int _currentPhotoIndex = -1; private int _currentAudioIndex = -1; private AltitudeRange _altitudeRange = null; - private long _movingSeconds = 0L; + private long _movingMilliseconds = 0L; private double _angMovingDistance = -1.0; @@ -77,7 +77,7 @@ public class Selection Timestamp time = null, previousTime = null; DataPoint lastPoint = null, currPoint = null; _angMovingDistance = 0.0; - _movingSeconds = 0L; + _movingMilliseconds = 0L; // Loop over points in selection for (int i=_startIndex; i<=_endIndex; i++) { @@ -99,7 +99,7 @@ public class Selection { // add moving time if (!currPoint.getSegmentStart() && previousTime != null && time.isAfter(previousTime)) { - _movingSeconds += time.getSecondsSince(previousTime); + _movingMilliseconds += time.getMillisecondsSince(previousTime); } previousTime = time; } @@ -156,7 +156,7 @@ public class Selection public long getMovingSeconds() { if (!_valid) recalculate(); - return _movingSeconds; + return _movingMilliseconds / 1000L; } /**