speedometer
Advanced tools
Comparing version 1.0.0 to 1.1.0
var tick = 1 | ||
var maxTick = 65535 | ||
var resolution = 4 | ||
var timer | ||
var inc = function () { | ||
@@ -8,6 +9,9 @@ tick = (tick + 1) & maxTick | ||
var timer = setInterval(inc, (1000 / resolution) | 0) | ||
if (timer.unref) timer.unref() | ||
module.exports = function (seconds) { | ||
if (!timer) { | ||
timer = setInterval(inc, (1000 / resolution) | 0) | ||
if (timer.unref) timer.unref() | ||
} | ||
var size = resolution * (seconds || 5) | ||
@@ -14,0 +18,0 @@ var buffer = [0] |
{ | ||
"name": "speedometer", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"repository": "git://github.com/mafintosh/speedometer", | ||
@@ -5,0 +5,0 @@ "description": "simple speed measurement in javascript", |
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
3034
31