Comparing version 2.1.0 to 2.1.1
@@ -28,6 +28,6 @@ 'use strict'; | ||
debug(`tickInterval = ${tickInterval}, duration = ${duration}`); | ||
this._tickInterval = Math.floor(tickInterval); | ||
this._tickInterval = Math.floor(tickInterval * 1000); // microseconds | ||
debug(`this._tickInterval set to ${this._tickInterval}`); | ||
this._interval = null; | ||
this._duration = duration || null; // ms | ||
this._duration = duration * 1000 || null; // microseconds | ||
this._timer = new Nanotimer(); | ||
@@ -54,3 +54,3 @@ return this; | ||
} | ||
}, '', self._tickInterval + 'm'); | ||
}, '', self._tickInterval + 'u'); | ||
return self; | ||
@@ -57,0 +57,0 @@ }; |
{ | ||
"name": "arrivals", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Modeling arrival processes of events in a system.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -70,3 +70,3 @@ # arrivals | ||
``` | ||
Copyright (c) 2015-2016, Hassy Veldstra <h@artillery.io> | ||
Copyright (c) 2015-2017, Hassy Veldstra <h@artillery.io> | ||
@@ -73,0 +73,0 @@ Permission to use, copy, modify, and/or distribute this software for any |
@@ -63,3 +63,3 @@ 'use strict'; | ||
var count = 0; | ||
var p = arrivals.uniform.process(400, 2700); | ||
var p = arrivals.uniform.process(1000/340, 1000); | ||
p.on('arrival', function() { | ||
@@ -70,3 +70,3 @@ t.ok(true, ' got arrival event ' + (++count)); | ||
t.ok(true, ' got finished event'); | ||
t.assert(count === 6, `Correct number of arrivals - got ${count} - 2`); | ||
t.assert(count === 340, `Correct number of arrivals - got ${count}`); | ||
t.end(); | ||
@@ -73,0 +73,0 @@ }); |
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
9332