protected void time(String name,Runnable r){
  System.gc();
  long start=System.currentTimeMillis();
  r.run();
  long dur=System.currentTimeMillis() - start;
  info(name + " took " + dur+ "ms.");
}

protected void time ( String name , Runnable r ) { System . gc ( ) ; long start = System . currentTimeMillis ( ) ; r . run ( ) ; long dur = System . currentTimeMillis ( ) - start ; info ( name + " took " + dur + "ms." ) ; }
executes runnable and prints out how long it took .
