forked from upstream-mirrors/OpenTracks
Workaround: Clock.systemUTC() seems to be not monotonic.
Introduced in 25e590da02
This commit is contained in:
@@ -208,7 +208,9 @@ public class TrackStatistics {
|
|||||||
@VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
|
@VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
|
||||||
public void addMovingTime(Duration time) {
|
public void addMovingTime(Duration time) {
|
||||||
if (time.isNegative()) {
|
if (time.isNegative()) {
|
||||||
throw new RuntimeException("Moving time cannot be negative");
|
// Needs implementation of a monotonic Clock #800
|
||||||
|
// throw new RuntimeException("Moving time cannot be negative");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
movingTime = movingTime.plus(time);
|
movingTime = movingTime.plus(time);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user