/guava/android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java
nextFreeTicketMicros = waitMicros;
nextFreeTicketMicros = nowMicros;
abstract long storedPermitsToWaitTime(double storedPermits, double permitsToTake); abstract double coolDownIntervalMicros(); void resync(long nowMicros) { if (nowMicros > nextFreeTicketMicros) { double newPermits = (nowMicros - nextFreeTicketMicros) / coolDownIntervalMicros(); storedPermits = min(maxPermits, storedPermits + newPermits); <extra_id_0> } } }