public void run() throws Exception {
  Task task=getTask();
  int size=getLoopCount();
  if (size <= 0 || task == null) {
    return;
  }
  long[] times=new long[size];
  for (int i=0; i < size; i++) {
    long start=System.currentTimeMillis();
    task.run();
    long end=System.currentTimeMillis();
    times[i]=end - start;
  }
  printSummary(times);
}

public void run ( ) throws Exception { Task task = getTask ( ) ; int size = getLoopCount ( ) ; if ( size <= 0 || task == null ) { return ; } long [ ] times = new long [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { long start = System . currentTimeMillis ( ) ; task . run ( ) ; long end = System . currentTimeMillis ( ) ; times [ i ] = end - start ; } printSummary ( times ) ; }
performs a piece of code a number of times in a loop
