Cleanup: use Duration.ZERO.

This commit is contained in:
Dennis Guse
2025-11-11 08:00:03 +01:00
committed by Dennis Guse
parent 8d1af8f2cf
commit ebcdd87481
5 changed files with 7 additions and 7 deletions
@@ -82,7 +82,7 @@ public record Speed(double speed_mps) {
public Duration toPace(UnitSystem unitSystem) {
if (isZero()) {
return Duration.ofSeconds(0);
return Duration.ZERO;
}
double distance = Distance.of(speed_mps).toKM_Miles(unitSystem);
@@ -185,8 +185,8 @@ public class SegmentStatisticUpdater {
startTime = null;
stopTime = null;
totalTime = Duration.ofSeconds(0);
movingTime = Duration.ofSeconds(0);
totalTime = Duration.ZERO;
movingTime = Duration.ZERO;
totalDistance = Distance.ZERO;
maxSpeed = Speed.ZERO;
totalAltitudeGain_m = null;
@@ -104,7 +104,7 @@ public class IntervalStatisticsUpdater {
@Deprecated
private static class Interval {
private Distance distance = Distance.ZERO;
private Duration time = Duration.ofSeconds(0);
private Duration time = Duration.ZERO;
private Float gain_m;
private Float loss_m;
private HeartRate avgHeartRate;