public static long nanosecondsToRun(Runnable runnable){
  long start=TimeKeeper.getCurrentTimeAsNanos();
  runnable.run();
  long end=TimeKeeper.getCurrentTimeAsNanos();
  return end - start;
}

public static long nanosecondsToRun ( Runnable runnable ) { long start = TimeKeeper . getCurrentTimeAsNanos ( ) ; runnable . run ( ) ; long end = TimeKeeper . getCurrentTimeAsNanos ( ) ; return end - start ; }
this method can take either a runnable or a runnablewithsetup . in the case of runnablewithsetup , the setup method will be called first , without impacting the timing .
