public static void awaitWithCheckCanceled(long millis) {
    long start = System.nanoTime();
    awaitWithCheckCanceled(() -> {
      if (TimeoutUtil.getDurationMillis(start) > millis) return true;
      TimeoutUtil.sleep(ConcurrencyUtil.DEFAULT_TIMEOUT_MS);
      return false;
    });
  }
public static void awaitWithCheckCanceled(long millis)