Provides a sleep
function which causes the current execution thread to sleep until the timeout expires.
npm i @esfx/threading-sleep
import { sleep } from "@esfx/threading-sleep";
// block the main thread for half a second
sleep(500);
You can read more about the API here.