private static boolean isClosest(long ts, long[] timeStamps, int curIdx) {
      if (curIdx >= (timeStamps.length - 1)) {
        // curIdx is the last one so it must be the closest
        return true;
      }
      if (ts == timeStamps[curIdx]) {
        return true;
      }
      return closer(ts, timeStamps[curIdx], timeStamps[curIdx + 1]);
    }
Returns true if the timeStamp at curIdx is the one that ts is the closest to. We know that
timeStamps[curIdx-1], if it exists, was not the closest.
geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java