mirror of
https://github.com/actions/javascript-action.git
synced 2025-04-07 15:59:40 +00:00
12 lines
271 B
JavaScript
12 lines
271 B
JavaScript
let wait = function(milliseconds) {
|
|
return new Promise((resolve, reject) => {
|
|
if (typeof(milliseconds) !== 'number') {
|
|
throw new Error('milleseconds not a number');
|
|
}
|
|
|
|
setTimeout(() => resolve("done!"), milliseconds)
|
|
});
|
|
}
|
|
|
|
module.exports = wait;
|