export const sleepSync = ( milliseconds ) => { const sab = new SharedArrayBuffer ( 4 ) ; const view = new Int32Array ( sab ) ; Atomics . wait ( view , 0 , 0 , milliseconds ) ; } ; export const sleep = ( milliseconds ) => { return new Promise ( ( resolve ) => setTimeout ( resolve , milliseconds ) ) ; } ;