code: private static final boolean inBounds(final long[] times, final double bound) {
          long min = times[0];
          long max = times[0];
          long limit = (long) (min * bound);
          for (int i = 1; i < times.length; i++) {
              if (times[i] < min) {
                  min = times[i];
                  limit = (long) (min * bound);
                  if (max > limit) {
                      return false;
                  }
              }
              if (times[i] > max) {
                  max = times[i];
                  // new max, is it slower than the worst allowed?
                  if (max > limit) {
                      return false;
                  }
              }
          }
          return true;
      }
docs: Compute whether any of the values in times exceed the given bound,
  relative to the minimum value in times.
  
  @param times
  the times to compute the bounds on
  @param bound
  the bound is represented as a value like 1.10 for 10% greater
  than the minimum
  @return true if all values are in bounds.