Hullo JS
Search…
timeout
import { timeout } from '@hullo/core'
This is a tiny helper function that returns a Promise that returns after specified amount of milliseconds.
1
import { timeout } from '@hullo/core';
2
​
3
(async weWillRockYou() => {
4
while (true) {
5
console.log('tum');
6
await timeout(100);
7
console.log('dum');
8
await timeout(100);
9
console.log('clap');
10
await timeout(200);
11
}
12
})()
Copied!
Last modified 2yr ago
Copy link