mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-13 20:15:35 +01:00
Fix EsLint config & update packages
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
let cooldownTimeout
|
||||
let cooldownResolve
|
||||
let cooldownTimeout = null
|
||||
let cooldownResolve = null
|
||||
|
||||
export const abortCooldown = () => {
|
||||
clearInterval(cooldownTimeout)
|
||||
@@ -20,10 +20,11 @@ export const cooldown = (ms, io, room) => {
|
||||
clearInterval(cooldownTimeout)
|
||||
resolve()
|
||||
}
|
||||
|
||||
io.to(room).emit("game:cooldown", count)
|
||||
count -= 1
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
|
||||
export const sleep = (sec) => new Promise((r) => setTimeout(r, sec * 1000))
|
||||
export const sleep = (sec) => new Promise((r) => void setTimeout(r, sec * 1000))
|
||||
|
||||
Reference in New Issue
Block a user