timer utility

This commit is contained in:
Michael Bradley, Jr 2018-09-19 19:47:38 -05:00
parent 7e52728dc0
commit ae8a59cf9b

View File

@ -490,6 +490,10 @@ function errorMessage(e) {
return e;
}
async function timer(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
module.exports = {
joinPath,
dirname,
@ -532,5 +536,6 @@ module.exports = {
sample,
last,
interceptLogs,
errorMessage
errorMessage,
timer
};