long () { long start = System.currentTimeMillis(); long minTime = Integer.MAX_VALUE; long minIteration = -1; for (int i = 0;; i++) { long time = TimeoutUtil.measureExecutionTime(MANDELBROT::compute); if (time < minTime) { minTime = time; minIteration = i; } else if (i - minIteration > 100) { System.out.println("CPU timing rating: " + minTime + " (calculated in " + (System.currentTimeMillis() - start) + "ms)"); return minTime; } } }