mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
merge 036, everything broken
This commit is contained in:
8
sdk/lib/trigger/cooldownTrigger.ts
Normal file
8
sdk/lib/trigger/cooldownTrigger.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export function cooldownTrigger(timeMs: number) {
|
||||
return async function* () {
|
||||
while (true) {
|
||||
await new Promise((resolve) => setTimeout(resolve, timeMs))
|
||||
yield
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user