1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 18:48:55 +08:00

add sleep function

This commit is contained in:
lana-k
2021-08-23 22:20:03 +02:00
parent ec3ec6f57a
commit bcd98fe1ad
3 changed files with 29 additions and 24 deletions

View File

@@ -11,5 +11,11 @@ export default {
clearTimeout(timeout)
timeout = setTimeout(() => func.apply(this, arguments), ms)
}
},
sleep (ms) {
return new Promise(resolve => {
setTimeout(() => { resolve() }, ms)
})
}
}