aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-manager.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-06-18 06:00:40 +0200
committerAgando <roduccomm@gmail.com>2026-06-18 06:00:40 +0200
commitfba6df22dae297c89fa0df065628dddded66c69c (patch)
treef954a04ee1effe56361282a16444deaa93bd0151 /modules/core/module-manager.js
parenta02db2f506dec15c0c89dd4f8f21f975f627e4fe (diff)
auto: 2026-06-18_06:00 changes
Diffstat (limited to 'modules/core/module-manager.js')
-rw-r--r--modules/core/module-manager.js15
1 files changed, 15 insertions, 0 deletions
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');