Browse Source

Adds elapsed to stopwatch

main
Eric Amodio 2 years ago
parent
commit
d1e2e5e62a
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/system/stopwatch.ts

+ 5
- 0
src/system/stopwatch.ts View File

@ -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);
}

Loading…
Cancel
Save