public double end(){
  assureRightState("end",true);
  lastTime=elapsed();
  lapped.add(lastTime);
  time=-1;
  return lastTime;
}

public double end ( ) { assureRightState ( "end" , true ) ; lastTime = elapsed ( ) ; lapped . add ( lastTime ) ; time = - 1 ; return lastTime ; }
ends current profiling session . saves result for average calculations .
