UNPKG

raygun

Version:

Raygun package for Node.js, written in TypeScript

11 lines (10 loc) 379 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.startTimer = startTimer; function startTimer() { var startTime = process.hrtime(); return function stopTimer() { var _a = process.hrtime(startTime), seconds = _a[0], nanoseconds = _a[1]; return Math.round(seconds * 1000 + nanoseconds / 1e6); // in milliseconds }; }