Bugfix: use monotonic clock.

Fixes #800.
This commit is contained in:
Dennis Guse
2022-01-06 21:40:29 +01:00
parent 43e1c99642
commit 522d8b41d8
3 changed files with 42 additions and 4 deletions
@@ -220,9 +220,7 @@ public class TrackStatistics {
@VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
public void addMovingTime(Duration time) {
if (time.isNegative()) {
// Needs implementation of a monotonic Clock #800
// throw new RuntimeException("Moving time cannot be negative");
return;
throw new RuntimeException("Moving time cannot be negative");
}
movingTime = movingTime.plus(time);
}