The interevent time between two records of the user.
325411
def interevent_time(records):
    
    inter_events = pairwise(r.datetime for r in records)
    inter = [(new - old).total_seconds() for old, new in inter_events]

    return summary_stats(inter)
576443
function timeDiff(newest, oldest) {
  var diff = (parseFloat(newest) - parseFloat(oldest));
  if (diff < 0) {
    diff = ((10000 + parseFloat(newest)) - parseFloat(oldest));
  }
  return diff;
}
380071
def timeframe(self, start, end):
        
        """
        if start:
            self._time_frame['chfieldfrom'] = start
        if end:
            self._time_frame['chfieldto'] = end
        return self
1301930
private int saveStartTime(long time)
    {
        int indexUsed = diagIndex;
        cycleTime[diagIndex++] = time;
        if (diagIndex >= MAX_DIAG_LOG)
        {
            diagIndex = 0;
        }
        return indexUsed;
    }
796649
def on_records(self, records):
        
        handler = self.handlers.get("on_records")
        if callable(handler):
            handler(records)
762303
def get_records(self, start_time, end_time, msgid=1,
                    number=10000):
        
        if isinstance(start_time, datetime.datetime):
            start_time = time.mktime(start_time.timetuple())
        if isinstance(end_time, datetime.datetime):
            end_time = time.mktime(end_time.timetuple())
        record_data = {
            'starttime': int(start_time),
            'endtime': int(end_time),
            'msgid': msgid,
            'number': number
        }
        res = self._post(
            'https://api.weixin.qq.com/customservice/msgrecord/getmsglist',
            data=record_data,
        )
        return res
318920
def _timestamps_eq(a, b):
    """"""
    assert isinstance(a, datetime)
    if not isinstance(b, datetime):
        return False
    # Local offsets must be equivalent.
    if (a.tzinfo is None) ^ (b.tzinfo is None):
        return False
    if a.utcoffset() != b.utcoffset():
        return False
    for a, b in ((a, b), (b, a)):
        if isinstance(a, Timestamp):
            if isinstance(b, Timestamp):
                # Both operands declare their precisions. They are only equivalent if their precisions are the same.
                if a.precision is b.precision and a.fractional_precision is b.fractional_precision:
                    break
                return False
            elif a.precision is not TimestampPrecision.SECOND or a.fractional_precision != MICROSECOND_PRECISION:
                # Only one of the operands declares its precision. It is only equivalent to the other (a naive datetime)
                # if it has full microseconds precision.
                return False
    return a == b
128360
function (time) {
    var data = this.data;
    var prevCheckTime = this.prevCheckTime;

    if (!data.enabled) { return; }

    // Only check for intersection if interval time has passed.
    if (prevCheckTime && (time - prevCheckTime < data.interval)) { return; }

    // Update check time.
    this.prevCheckTime = time;
    this.checkIntersections();
  }
953674
def querytime(self, value):
        
        self._querytime = value
        self.query.querytime = value
564671
def timespan(start_time):
    """"""

    timespan = datetime.datetime.now() - start_time
    timespan_ms = timespan.total_seconds() * 1000
    return timespan_ms
457178
protected void aggregateEntry(Entry other, long currentTime,
            double negLambda) {
        this.data.aggregate(other.data, currentTime - this.timestamp,
                negLambda);
        this.timestamp = currentTime;
    }
77217
def occurrences_between(t1, t2)
      return ((start_time < t1 || @start_time >= t2) ? [] : [start_time]) if @occurrence.nil?

      @occurrence.occurrences_between(t1, t2)
    end
627855
def timing(self, stat, delta, rate=1):
        """"""
        return self.send(stat, "%d|ms" % delta, rate)
529778
function onUserPlayerChange(data){

            var player = gameData.player;

            //Check if data contains different values
            if (player.get("angle") !== data.angle.toPrecision(1) || player.get("isAccelerating") !== data.isAccelerating){
                var buffer = micro.toBinary(data, "PlayerUpdate");
                socket.send(buffer);

                //Allow for latency before setting these changes on the player
                setTimeout(function(){
                    player.set(data);
                }, latency);
            }
        }
620356
function comparator(a, b) {
    var aHasIndex = a.hasOwnProperty('index'),
        bHasIndex = b.hasOwnProperty('index');

    if (aHasIndex) {
      if (bHasIndex) {
        if (a.index != b.index) {
          return a.index - b.index;
        }
      }
      else {
        return -1;
      }
    }

    else if (bHasIndex) {
      return 1;
    }

    var aHasTimestamp = a.hasOwnProperty('timestamp'),
        bHasTimestamp = b.hasOwnProperty('timestamp');

    if (aHasTimestamp) {
      if (bHasTimestamp) {
        if (a.timestamp != b.timestamp) {
          return b.timestamp - a.timestamp;
        }
      }
      else {
        return -1;
      }
    }

    else if (bHasTimestamp) {
      return 1;
    }
    
    return a.name > b.name ? 1 : -1;
  }
511750
def filter_counter(self, counter, min=2, max=100000000):
        
        records_filterd = {}
        counter_all_records = 0
        for item in counter:
            counter_all_records += 1
            if max > counter[item] >= min:
                records_filterd[item] = counter[item]

        self.stat['user_record_events'] = counter_all_records
        self.stat['records_filtered'] = len(records_filterd)
        return records_filterd
1321582
def background_time(self):
        """"""
        time = 1.0 / self.timeslide_interval
        for ifo in self.singles:
            time *= self.singles[ifo].filled_time * self.analysis_block
        return time