Skip to content

Commit

Permalink
Add sleep to Utils (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypc-faros committed May 13, 2023
1 parent eb7a734 commit 9627893
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,10 @@ export class Utils {
}
return Duration.fromObject({[unit]: num});
}

static sleep(millis: number): Promise<void> {
return new Promise((resolve) => {
setTimeout(resolve, millis);
});
}
}

0 comments on commit 9627893

Please sign in to comment.