@Override public final void sample(){
synchronized (_lock) {
    long count=_count.get();
    long lastCount=_lastAvgCount;
    _lastAvgCount=count;
    long sum=_sum.get();
    double lastSum=_lastAvgSum;
    _lastAvgSum=sum;
    if (count == lastCount)     _value=0;
 else     _value=_scale * (sum - lastSum) / (double)(count - lastCount);
  }
}

@ Override public final void sample ( ) { synchronized ( _lock ) { long count = _count . get ( ) ; long lastCount = _lastAvgCount ; _lastAvgCount = count ; long sum = _sum . get ( ) ; double lastSum = _lastAvgSum ; _lastAvgSum = sum ; if ( count == lastCount ) _value = 0 ; else _value = _scale * ( sum - lastSum ) / ( double ) ( count - lastCount ) ; } }
return the probe ' s next average .
