public U64 addObservedLatency(U64 latency){
  if (isLatencyHistoryFull()) {
    latencyHistory.removeFirst();
  }
  latencyHistory.addLast(latency);
  if (currentLatency == null) {
    currentLatency=latency;
    return currentLatency;
  }
 else {
    return getLatency();
  }
}

public U64 addObservedLatency ( U64 latency ) { if ( isLatencyHistoryFull ( ) ) { latencyHistory . removeFirst ( ) ; } latencyHistory . addLast ( latency ) ; if ( currentLatency == null ) { currentLatency = latency ; return currentLatency ; } else { return getLatency ( ) ; } }
append a new ( presumably most recent ) latency to the list . sets the current latency if this is the first latency update performed . note the latter serves as a latency initializer .
