public synchronized PerfRate cloneAndReset(){
  PerfRate rc=new PerfRate();
  rc.totalCount=totalCount;
  rc.count=count;
  rc.startTime=startTime;
  count=0;
  startTime=System.currentTimeMillis();
  return rc;
}

public synchronized PerfRate cloneAndReset ( ) { PerfRate rc = new PerfRate ( ) ; rc . totalCount = totalCount ; rc . count = count ; rc . startTime = startTime ; count = 0 ; startTime = System . currentTimeMillis ( ) ; return rc ; }
resets the rate sampling .
