We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74c72db commit a7042f9Copy full SHA for a7042f9
primitives/utils/src/async.ts
@@ -0,0 +1,9 @@
1
+/**
2
+ * @example
3
+ * await sleep(1000);
4
+ * console.log('done');
5
+ */
6
+export const sleep = (ms: number) =>
7
+ new Promise(resolve => {
8
+ setTimeout(resolve, ms);
9
+ });
0 commit comments