Create a turnstile object that admits clients at the specified rate, expressed as the number of turns per second. Optionally specify the (relative) startTime of the first turn. If startTime is not specified, the first turn may be taken immediately. Optionally specify minTimeToCallSleep, the shortest period of time in seconds that the waitTurn function will go to sleep. The behavior is undefined unless 0 < rate.

Synopsis

Declared in <bslmt_turnstile.h>

explicit
Turnstile(
    double rate,
    bsls::TimeInterval const& startTime = bsls::TimeInterval(0),
    bsls::TimeInterval const& minTimeToCallSleep = bsls::TimeInterval(1e‐4));

Created with MrDocs