Update interval for spirit push to every 20 seconds
This commit is contained in:
@@ -52,11 +52,11 @@ function pushSpiritToAllClients() {
|
|||||||
console.log(`Spirit "${spirit.name}" wurde an alle Clients gepusht.`);
|
console.log(`Spirit "${spirit.name}" wurde an alle Clients gepusht.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Timer: Alle 15 Sekunden neues Spirit ---
|
// --- Timer: Alle 20 Sekunden neues Spirit ---
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
currentSpiritIndex = Math.floor(Math.random() * spirits.length);
|
currentSpiritIndex = Math.floor(Math.random() * spirits.length);
|
||||||
pushSpiritToAllClients();
|
pushSpiritToAllClients();
|
||||||
}, 15000);
|
}, 20000);
|
||||||
|
|
||||||
// Beim Start: Ersten Spirit pushen
|
// Beim Start: Ersten Spirit pushen
|
||||||
setTimeout(pushSpiritToAllClients, 1500);
|
setTimeout(pushSpiritToAllClients, 1500);
|
||||||
|
|||||||
Reference in New Issue
Block a user