round time for consistent countdown

This commit is contained in:
Lyall 2025-06-30 06:57:50 +01:00
parent b99ac01e5c
commit fad28b05a1

View file

@ -806,7 +806,14 @@ export default {
clearInterval(this.updateCountdown);
this.updateCountdown = setInterval(() => {
const countdown = dayjs.duration(this.lastUpdateTime.add(Math.max(5, this.config.autoRefreshInterval), "seconds").diff(dayjs()));
const countdown = dayjs.duration(
Math.round(
this.lastUpdateTime
.add(Math.max(5, this.config.autoRefreshInterval), "seconds")
.diff(dayjs())
/ 1000
), "seconds");
if (countdown.as("seconds") < 0) {
clearInterval(this.updateCountdown);
} else {