[#BloombergLP-balb-LeakyBucket-calculateCapacity] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::xref:BloombergLP/balb/LeakyBucket.adoc[LeakyBucket]::calculateCapacity :relfileprefix: ../../../ :mrdocs: Return the capacity of a leaky bucket as the rounded‐down product of the specified `drainRate` by the specified `timeWindow`. If the result evaluates to 0, return 1. The behavior is undefined unless the product of `drainRate` and `timeWindow` can be represented by a 64‐bit unsigned integral type. == Synopsis Declared in `<balb_leakybucket.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bsls/Types/Uint64.adoc[bsls::Types::Uint64] calculateCapacity( xref:BloombergLP/bsls/Types/Uint64.adoc[bsls::Types::Uint64] drainRate, xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& timeWindow); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#