Method
addCallback
(
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 |
Tested by
no test coverage detected