Files
Country-Game---The-Desk/web/js/timer-worker.js
T

4 lines
231 B
JavaScript

// A heartbeat for the game loop. Browsers stop animation frames in a background tab and slow
// down its timers, but a worker's timer keeps going, so the game can keep running while hidden.
setInterval(() => postMessage(0), 100);