src/protocol/timedata.js
function TimeData(limit) {
  if (!(this instanceof TimeData))
    return new TimeData(limit);

  EventEmitter.call(this);

  if (limit == null)
    limit = 200;

  this.samples = [];
  this.known = new Map();
  this.limit = limit;
  this.offset = 0;
  this.checked = false;
  this.ntp = new NTP();
}
function TimeData(limit) {
  if (!(this instanceof TimeData))
    return new TimeData(limit);

  EventEmitter.call(this);

  if (limit == null)
    limit = 200;

  this.samples = [];
  this.known = new Map();
  this.limit = limit;
  this.offset = 0;
  this.checked = false;
  this.ntp = new NTP();
}
function TimeData ( limit ) { if ( ! ( this instanceof TimeData ) ) return new TimeData ( limit ) ; EventEmitter . call ( this ) ; if ( limit == null ) limit = 200 ; this . samples = [ ] ; this . known = new Map ( ) ; this . limit = limit ; this . offset = 0 ; this . checked = false ; this . ntp = new NTP ( ) ; }
An object which handles "adjusted time". This may not
look it, but this is actually a semi-consensus-critical
piece of code. It handles version packets from peers
and calculates what to offset our system clock's time by.
@alias module:protocol.TimeData
@constructor
@param {Number} [limit=200]
@property {Array} samples
@property {Object} known
@property {Number} limit
@property {Number} offset
An object which handles adjusted time . This may not look it but this is actually a semi - consensus - critical piece of code . It handles version packets from peers and calculates what to offset our system clock s time by .