From fba6df22dae297c89fa0df065628dddded66c69c Mon Sep 17 00:00:00 2001 From: Agando Date: Thu, 18 Jun 2026 06:00:40 +0200 Subject: auto: 2026-06-18_06:00 changes --- modules/core/module-manager.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'modules/core/module-manager.js') diff --git a/modules/core/module-manager.js b/modules/core/module-manager.js index 4f004ee..8cecc4d 100644 --- a/modules/core/module-manager.js +++ b/modules/core/module-manager.js @@ -4,8 +4,23 @@ this.terminal = terminal; this.modules = {}; this.moduleRegistry = []; + this._timers = []; // v4.5.68: central timer registry this.loadFromStorage(); } + // v4.5.68: Central timer registry — all modules should use these instead of raw setInterval + _setInterval(fn, ms) { + const id = setInterval(fn, ms); + this._timers.push(id); + return id; + } + _clearTimer(id) { + clearInterval(id); + this._timers = this._timers.filter(t => t !== id); + } + clearAllTimers() { + this._timers.forEach(id => clearInterval(id)); + this._timers = []; + } loadFromStorage() { try { const saved = localStorage.getItem('webx11_modules'); -- cgit v1.2.3