code: private long calcWaitTime(long clientCustomerId, @Nullable Throwable throwable) {
      long nowInMillis = dateProvider.getNowInMillis();
  
      long waitForMillis = 0L;
      waitForMillis = Math.max(waitForMillis, tokenWaitUntil.get() - nowInMillis);
      waitForMillis = Math.max(waitForMillis, getAccountWaitTime(clientCustomerId) - nowInMillis);
  
      if (waitForMillis > 0
          && maxWaitTimeOnRateExceededError > 0
          && waitForMillis > SECONDS.toMillis(maxWaitTimeOnRateExceededError)) {
        throw new RateLimiterException(
            "Need to wait too long (more than " + maxWaitTimeOnRateExceededError + " seconds).",
            throwable);
      }
  
      return waitForMillis;
    }
docs: Calculate the wait time (in millis) before next AdWords API call is allowed.