MCPcopy Create free account
hub / github.com/esengine/esengine / addCallback

Method addCallback

packages/fairygui/src/core/Timer.ts:237–255  ·  view source on GitHub ↗
(
        interval: number,
        caller: any,
        callback: Function,
        repeat: boolean
    )

Source from the content-addressed store, hash-verified

235 }
236
237 private addCallback(
238 interval: number,
239 caller: any,
240 callback: Function,
241 repeat: boolean
242 ): void {
243 this.clear(caller, callback);
244
245 const id = this._nextId++;
246 this._callbacks.set(id, {
247 id,
248 caller,
249 callback,
250 interval,
251 elapsed: 0,
252 repeat,
253 removed: false
254 });
255 }
256
257 /**
258 * Dispose the timer

Callers 2

onceMethod · 0.95
loopMethod · 0.95

Calls 2

clearMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected