Block until it is time for the next operation, according to the
nanoseconds per op as set by applyRateSpec(RateSpec)
Returns:
the waittime as nanos behind schedule when this op returns.
The returned value is required to be greater than or equal to zero.
Note that accuracy of the returned value is limited by timing
precision and calling overhead of the real time clock. It will not
generally be better than microseconds. Also, some rate limiting
algorithms are unable to efficiently track per-op waittime at speed
due to bulk allocation mechanisms necessary to support higher rates.
Return the total number of nanoseconds behind schedule
that this rate limiter is, including the full history across all
rates. When the rate is changed, this value is check-pointed to
an accumulator and also included in any subsequent measurement.
Returns:
nanoseconds behind schedule since the rate limiter was started
Return the total number of nanoseconds behind schedule
that this rate limiter is, but only since the last time the rate spec
has changed. When the rate is changed, this value is check-pointed to
an accumulator and also included in any subsequent measurement.
Returns:
nanoseconds behind schedule since the rate limiter was started