No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

timer.js 376B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Timer = void 0;
  4. class Timer {
  5. constructor() {
  6. this.start = process.hrtime.bigint();
  7. }
  8. stop() {
  9. const stop = process.hrtime.bigint();
  10. const elapsedNanos = stop - this.start;
  11. return Number(elapsedNanos / BigInt(1e6));
  12. }
  13. }
  14. exports.Timer = Timer;