private boolean awaitWithCheck(final long timeoutNanos) throws InterruptedException {
    long startNanos = nanoTimer.nanoTime();
    boolean unlatched;
    do {
      stopper.checkCancelInProgress(null);
      unlatched = delegate.await(retryIntervalNanos, NANOSECONDS);
    } while (!unlatched && nanoTimer.nanoTime() - startNanos < timeoutNanos);
    return unlatched;
  }
@param timeoutMillis how long to wait in milliseconds

@return true if it was unlatched
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/StoppableCountDownLatch.java