(fn:Function, wait = 0)
| 75 | |
| 76 | get now() { return this._now; } |
| 77 | setTimeout(fn:Function, wait = 0) { |
| 78 | const when = this._now + wait; |
| 79 | const id = this._nextId++; |
| 80 | this.timeouts.set(id, {id, fn, when}); |
| 81 | this._fire(); |
| 82 | return id; |
| 83 | } |
| 84 | clearTimeout(id:number) { this.timeouts.delete(id); } |
| 85 | } |
| 86 |
no test coverage detected