1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var tslib_1 = require("tslib");
|
4 | function 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 | }
|
14 | exports.initTimer = initTimer;
|