public synchronized long waitInterval(final long amount) {
    return (amount <= avail) ? 0 : getWaitInterval(getLimit(), avail, amount);
  }
Returns estimate of the ms required to wait before being able to provide "amount" resources.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/quotas/RateLimiter.java