Fixed the pause controller

This commit is contained in:
Mathias
2022-08-09 16:50:46 +02:00
parent 5279932f1d
commit c3ebaab58d

View File

@@ -8,11 +8,15 @@ module.exports.updateState = function(newState) {
// Update the current state in a specific time
module.exports.resumeIn = function(time) {
if (isNaN(time)) return;
if (updateTimer !== null)
clearTimeout(updateTimer);
this.updateState(true);
updateTimer = setTimeout(() => this.updateState(false), time * 3600000); // time in hours
return true;
}
module.exports.currentState = currentState;