Fix calculation of backup staleness metric
This commit is contained in:
parent
df188e6f15
commit
8c2f3c839f
|
@ -101,7 +101,7 @@ public class BackupMetricsCommand extends AbstractCommandWithDependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Duration timeSince(Instant t) {
|
private Duration timeSince(Instant t) {
|
||||||
Duration between = Duration.between(clock.instant(), t);
|
final Duration between = Duration.between(t, clock.instant());
|
||||||
if (between.isNegative()) {
|
if (between.isNegative()) {
|
||||||
return Duration.ZERO;
|
return Duration.ZERO;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue