source: trip-planner-front/node_modules/performance-now/lib/performance-now.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1// Generated by CoffeeScript 1.12.2
2(function() {
3 var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
4
5 if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
6 module.exports = function() {
7 return performance.now();
8 };
9 } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
10 module.exports = function() {
11 return (getNanoSeconds() - nodeLoadTime) / 1e6;
12 };
13 hrtime = process.hrtime;
14 getNanoSeconds = function() {
15 var hr;
16 hr = hrtime();
17 return hr[0] * 1e9 + hr[1];
18 };
19 moduleLoadTime = getNanoSeconds();
20 upTime = process.uptime() * 1e9;
21 nodeLoadTime = moduleLoadTime - upTime;
22 } else if (Date.now) {
23 module.exports = function() {
24 return Date.now() - loadTime;
25 };
26 loadTime = Date.now();
27 } else {
28 module.exports = function() {
29 return new Date().getTime() - loadTime;
30 };
31 loadTime = new Date().getTime();
32 }
33
34}).call(this);
35
36//# sourceMappingURL=performance-now.js.map
Note: See TracBrowser for help on using the repository browser.