UNPKG

496 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4function initTimer() {
5 var startTime = process.hrtime();
6 function stop() {
7 var duration = process.hrtime(startTime);
8 var _a = tslib_1.__read(duration, 2), seconds = _a[0], nanoseconds = _a[1];
9 var milliseconds = seconds * 1000 + nanoseconds / 1e6;
10 return Math.round(milliseconds);
11 }
12 return { stop: stop };
13}
14exports.initTimer = initTimer;