Return the time interval required to drain the specified numUnits at the specified drainRate, round up the number of nanoseconds in the time interval if the specified ceilFlag is set to true, otherwise, round down the number of nanoseconds. The behavior is undefined unless the number of seconds in the calculated interval may be represented by a 64‐bit signed integral type.

Synopsis

Declared in <balb_leakybucket.h>

static
bsls::TimeInterval
calculateDrainTime(
    bsls::Types::Uint64 numUnits,
    bsls::Types::Uint64 drainRate,
    bool ceilFlag);

Created with MrDocs