let e=null,t=0;self.onmessage=n=>{let r=n.data?.type;if(r===`start`){if(e!==null)return;e=setInterval(()=>{self.postMessage({type:`tick`,seq:t++})},250)}else r===`stop`&&e!==null&&(clearInterval(e),e=null)};