mcopy/lib/delay/index.js

15 lines
343 B
JavaScript
Raw Normal View History

2019-03-21 19:02:05 +00:00
'use strict';
/**
* Delay in an async/await function
*
* @param {integer} ms Milliseconds to delay for
*
* @returns {Promise} Promise to resolve after timeout
**/
function delay(ms) {
return new Promise((resolve) => {
return setTimeout(resolve, ms);
});
}
module.exports.delay = delay;
2019-03-21 19:02:05 +00:00
//# sourceMappingURL=index.js.map