performance-now
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -5,17 +5,24 @@ // Generated by CoffeeScript 1.6.2 | ||
hrtime = process.hrtime; | ||
if ((typeof performance !== "undefined" && performance !== null) && performance.now) { | ||
module.exports = function() { | ||
return performance.now(); | ||
}; | ||
} else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { | ||
module.exports = function() { | ||
return (getNanoSeconds() - loadTime) / 1e6; | ||
}; | ||
hrtime = process.hrtime; | ||
getNanoSeconds = function() { | ||
var hr; | ||
module.exports = function() { | ||
return (getNanoSeconds() - loadTime) / 1e6; | ||
}; | ||
hr = hrtime(); | ||
return hr[0] * 1e9 + hr[1]; | ||
}; | ||
loadTime = getNanoSeconds(); | ||
} else { | ||
module.exports = function() { | ||
return Date.now(); | ||
}; | ||
} | ||
getNanoSeconds = function() { | ||
var hr; | ||
hr = hrtime(); | ||
return hr[0] * 1e9 + hr[1]; | ||
}; | ||
loadTime = getNanoSeconds(); | ||
}).call(this); | ||
@@ -22,0 +29,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"keywords": [], | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Meryn Stol <merynstol@gmail.com>", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7533
27