public void tick(){
  final long count=uncounted.sumThenReset();
  final double instantRate=count / interval;
  if (initialized) {
    rate+=(alpha * (instantRate - rate));
  }
 else {
    rate=instantRate;
    initialized=true;
  }
}

public void tick ( ) { final long count = uncounted . sumThenReset ( ) ; final double instantRate = count / interval ; if ( initialized ) { rate += ( alpha * ( instantRate - rate ) ) ; } else { rate = instantRate ; initialized = true ; } }
mark the passage of time and decay the current rate accordingly .
