const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time)); await sleep(500) // Do something after the sleep!