[#BloombergLP-bslmt-Turnstile-2constructor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Turnstile.adoc[Turnstile]::Turnstile
:relfileprefix: ../../../
:mrdocs:

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

== Synopsis

Declared in `&lt;bslmt&lowbar;turnstile&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
Turnstile(
    double rate,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& startTime = bsls&colon;&colon;TimeInterval(0),
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& minTimeToCallSleep = bsls&colon;&colon;TimeInterval(1e&hyphen;4));
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
