async function sleep(time = 1) { const sleepMilliseconds = time * 1000 return new Promise(resolve => { setTimeout(() => { resolve(`Slept for: ${sleepMilliseconds}ms`) }, sleepMilliseconds) }) }