mirror of
https://github.com/actions/container-toolkit-action.git
synced 2025-12-11 12:37:21 +00:00
13 lines
340 B
TypeScript
13 lines
340 B
TypeScript
/**
|
|
* Wait for a number of milliseconds. Resolves with 'done!' after the wait time.
|
|
*/
|
|
export async function wait(milliseconds: number): Promise<string> {
|
|
return new Promise(resolve => {
|
|
if (isNaN(milliseconds)) {
|
|
throw new Error('milliseconds not a number')
|
|
}
|
|
|
|
setTimeout(() => resolve('done!'), milliseconds)
|
|
})
|
|
}
|