lib/TimedSample.js
function TimedSample(dt, timeStamp, persistObj, scaleFactor) {
	var time = (dt[0] + dt[1] / 1e9) * 1000 / scaleFactor;

	this.scaleFactor = scaleFactor;
	this.min = time;
	this.max = time;
	this.sigma = new StandardDeviation(time);
	this.average = new Average(time);
	this.timeStamp = timeStamp;

	if (persistObj) {
		var that = this;

		persistObj.on('reset', function (timeStamp) {
			that.reset(timeStamp);
		});
	}
}
function TimedSample(dt, timeStamp, persistObj, scaleFactor) {
	var time = (dt[0] + dt[1] / 1e9) * 1000 / scaleFactor;

	this.scaleFactor = scaleFactor;
	this.min = time;
	this.max = time;
	this.sigma = new StandardDeviation(time);
	this.average = new Average(time);
	this.timeStamp = timeStamp;

	if (persistObj) {
		var that = this;

		persistObj.on('reset', function (timeStamp) {
			that.reset(timeStamp);
		});
	}
}
function TimedSample ( dt , timeStamp , persistObj , scaleFactor ) { var time = ( dt [ 0 ] + dt [ 1 ] / 1e9 ) * 1000 / scaleFactor ; this . scaleFactor = scaleFactor ; this . min = time ; this . max = time ; this . sigma = new StandardDeviation ( time ) ; this . average = new Average ( time ) ; this . timeStamp = timeStamp ; if ( persistObj ) { var that = this ; persistObj . on ( 'reset' , function ( timeStamp ) { that . reset ( timeStamp ) ; } ) ; } }
Timed sample object constructor.

@param {Number[]} dt        Takes the output of a diff produced by feeding the result of one
hrtime as the parameter to another.
@param {Number} timeStamp   A unix time stamp (in ms).
@param {Object} persistObj  Emits reset events. An instance of timed sample belongs to this
object.
@param {Number} scaleFactor The scale factor for time calculations. 1 -> 1kHz, 1000 -> 1Hz.
@constructor
@alias module:TimedSample
Timed sample object constructor .