MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / startSyncLoop

Function startSyncLoop

src/lib/sync.ts:278–288  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

276}
277
278export function startSyncLoop() {
279 if (syncTimer) return;
280 console.info(`[sync] Starting sync loop (${SYNC_INTERVAL / 1000}s interval)`);
281
282 // Run immediately
283 runSync();
284
285 syncTimer = setInterval(() => {
286 runSync();
287 }, SYNC_INTERVAL);
288}
289
290export function stopSyncLoop() {
291 if (syncTimer) {

Callers 1

registerFunction · 0.85

Calls 1

runSyncFunction · 0.85

Tested by

no test coverage detected