Fehler behoben

This commit is contained in:
Tobias Peper 2025-03-02 12:59:04 +01:00
parent aaaeb99582
commit da12fcfee1

View File

@ -107,7 +107,13 @@ public class FillAggregateTableMain2 {
} else {
value = rs.getLong("value");
}
final long tsDiff = Math.min(timestamp - currentTimestamp, intervalEndTimestamp - currentTimestamp);
final long tsDiff;
if (timestamp < intervalEndTimestamp) {
tsDiff = timestamp - currentTimestamp;
} else {
tsDiff = intervalEndTimestamp - currentTimestamp;
}
// final long tsDiff = Math.min(timestamp - currentTimestamp, intervalEndTimestamp - currentTimestamp);
sumDiff += tsDiff;
currentTimestamp = timestamp;
if (value > 0) {