(name)
| 21 | this.diff = diff; |
| 22 | } |
| 23 | push(name) { |
| 24 | if (!hop(this.events, name)) { |
| 25 | this.events[name] = []; |
| 26 | this.visits[name] = 0; |
| 27 | } |
| 28 | this.events[name].push(this.now()); |
| 29 | this.visits[name]++; |
| 30 | } |
| 31 | pop(name) { |
| 32 | if (hop(this.events, name) && this.events[name].length > 0) { |
| 33 | const start = this.events[name].shift(); |