mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Cleanup: use Duration.ZERO.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user