Skip to content

Commit

Permalink
feat: add sleep function
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Feb 19, 2024
1 parent 616c589 commit aba3fa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/backend/src/utils/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ export function validateUUID(string?: string) {
const uuidSchema = z.string().uuid()
return uuidSchema.safeParse(string).success
}

export function sleep(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms))
}

0 comments on commit aba3fa0

Please sign in to comment.