Bad method to "pause" process.
npm i synced-delay
import {syncedDelay, SyncedDelayResultType} from 'synced-delay';
console.log(new Date()); // current date/time
syncedDelay(3000); // "pause" process for 3 seconds
console.log(new Date()); // current date/time, but plus 3 seconds
See license.