mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-19 18:48:10 +00:00
12 lines
291 B
JavaScript
12 lines
291 B
JavaScript
const INTERVAL_MS = 60000;
|
|
|
|
postMessage({ type: "ready", at: Date.now() });
|
|
|
|
self.onmessage = event => {
|
|
if(event.data && event.data.type === "ping") postMessage({ type: "ready", at: Date.now() });
|
|
};
|
|
|
|
setInterval(() => {
|
|
postMessage({ type: "cycle", at: Date.now() });
|
|
}, INTERVAL_MS);
|