Return the time interval over which a leaky bucket approximates a moving‐total of submitted units, as the rounded‐down ratio between the specified capacity and the specified drainRate. If the rounded ratio is 0, return a time interval of 1 nanosecond. The behavior is undefined unless drainRate > 0 and capacity / drainRate can be represented with 64‐bit signed integral type.
Synopsis
Declared in <balb_leakybucket.h>
static
bsls::TimeInterval
calculateTimeWindow(
bsls::Types::Uint64 drainRate,
bsls::Types::Uint64 capacity);
Created with MrDocs