(name = 'Benchmark')
| 181 | |
| 182 | class Timer { |
| 183 | constructor(name = 'Benchmark') { |
| 184 | this.NS_PER_SEC = 1e9 |
| 185 | this.MS_PER_NS = 1e-6 |
| 186 | this.name = name |
| 187 | this.startTime = process.hrtime() |
| 188 | } |
| 189 | runtimeMs() { |
| 190 | const diff = process.hrtime(this.startTime) |
| 191 | return (diff[0] * this.NS_PER_SEC + diff[1]) * this.MS_PER_NS |
nothing calls this directly
no outgoing calls
no test coverage detected