(tag: T, loops = 1)
| 34 | this.begins[tag] = now(); |
| 35 | } |
| 36 | end(tag: T, loops = 1) { |
| 37 | if (isRelease()) return; |
| 38 | |
| 39 | const begin = this.begins[tag]; |
| 40 | // begin timestamp not found, give up |
| 41 | if (!begin) return; |
| 42 | const end = now(); |
| 43 | const elapsed = end - begin; |
| 44 | const entry = |
| 45 | this.entires[tag] ?? (this.entires[tag] = emptyTimerEntry(tag)); |
| 46 | entry.count++; |
| 47 | entry.loops += loops; |
| 48 | entry.time += elapsed; |
| 49 | } |
| 50 | print(tag: T) { |
| 51 | if (isRelease()) return; |
| 52 |
no test coverage detected