First Committ
This commit is contained in:
11
src/utils/methods.ts
Executable file
11
src/utils/methods.ts
Executable file
@@ -0,0 +1,11 @@
|
||||
export function timeout(duration: number): Promise<{}> {
|
||||
return new Promise((resolve, reject) => {
|
||||
setTimeout(() => { // @ts-ignore
|
||||
resolve()
|
||||
}, duration);
|
||||
})
|
||||
}
|
||||
|
||||
export function randomNumber(min: number, max: number) : number {
|
||||
return Math.floor((Math.random() * max) + min);
|
||||
}
|
||||
Reference in New Issue
Block a user