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