guava/src/com/google/common/util/concurrent/RateLimiter.java
@CanIgnoreReturnValue
  public double acquire(int permits) {
    long microsToWait = reserve(permits);
    stopwatch.sleepMicrosUninterruptibly(microsToWait);
    return 1.0 * microsToWait / SECONDS.toMicros(1L);
  }
@CanIgnoreReturnValue
  public double acquire(int permits) {
    long microsToWait = reserve(permits);
    stopwatch.sleepMicrosUninterruptibly(microsToWait);
    return 1.0 * microsToWait / SECONDS.toMicros(1L);
  }
Acquires the given number of permits from this {@code RateLimiter}, blocking until the request
can be granted. Tells the amount of time slept, if any.

@param permits the number of permits to acquire
@return time spent sleeping to enforce rate, in seconds; 0.0 if not rate-limited
@throws IllegalArgumentException if the requested number of permits is negative or zero
@since 16.0 (present in 13.0 with {@code void} return type})