diff --git a/src/system/stopwatch.ts b/src/system/stopwatch.ts index 41f85c2..0494279 100644 --- a/src/system/stopwatch.ts +++ b/src/system/stopwatch.ts @@ -54,6 +54,11 @@ export class Stopwatch { } } + elapsed(): number { + const [secs, nanosecs] = hrtime(this.time); + return secs * 1000 + Math.floor(nanosecs / 1000000); + } + log(options?: StopwatchLogOptions): void { this.logCore(this.scope, options, false); }