let e,a=+new Date;worker.onMessage((o=>{console.log("worker onMessage",o,o.fps),"start"===o.command?e=setInterval((()=>{worker.postMessage({time:+new Date-a}),a=+new Date}),Math.floor(1e3/o.fps)):clearInterval(e)}));