optimized autorefresh

This commit is contained in:
Ralf Bauer 2023-06-26 20:31:24 +02:00
parent 4a8078ad66
commit 4b88413b4f
2 changed files with 5 additions and 9 deletions

View File

@ -77,15 +77,11 @@ export default defineComponent({
},
startautorefresh() {
var nextDate = new Date();
if (nextDate.getMinutes() === 0) {
this.callEveryHour()
} else {
nextDate.setHours(nextDate.getHours() + 1);
nextDate.setMinutes(0);
nextDate.setSeconds(10);
nextDate.setSeconds(5);
var difference: number = nextDate.valueOf() - Date.now();
setTimeout(this.callEveryHour, difference);
}
},
}
});

Binary file not shown.