/guava/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java
double permitsAboveThresholdToTake = min( availablePermitsAboveThreshold, slope) ;
double permitsAboveThresholdToTake = min ( availablePermitsAboveThreshold, permitsToTake ) ;
} @Override long storedPermitsToWaitTime(double storedPermits, double permitsToTake) { double availablePermitsAboveThreshold = storedPermits - thresholdPermits; long micros = 0; if (availablePermitsAboveThreshold > 0.0) { <extra_id_0> double length = permitsToTime(availablePermitsAboveThreshold) + permitsToTime(availablePermitsAboveThreshold - permitsAboveThresholdToTake); micros = (long) (permitsAboveThresholdToTake * length / 2.0); permitsToTake -= permitsAboveThresholdToTake; }