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

Constructors

== Synopses

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

Create a timed semaphore initially having a count of 0&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0b.adoc[TimedSemaphore](xref:BloombergLP/bsls/SystemClockType/Enum.adoc[bsls::SystemClockType::Enum] clockType = bsls&colon;&colon;SystemClockType&colon;&colon;e&lowbar;REALTIME);
----

[.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Create a timed semaphore initially having a count of 0&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bslmt/TimedSemaphore/2constructor-04.adoc[TimedSemaphore](std::chrono::steady&lowbar;clock const& steadyClock);
----

[.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-04.adoc[_» more&period;&period;&period;_]#

Create a timed semaphore initially having a count of 0&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0a1.adoc[TimedSemaphore](std::chrono::system&lowbar;clock const& systemClock);
----

[.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0a1.adoc[_» more&period;&period;&period;_]#

Create a timed semaphore initially having the specified `count`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bslmt/TimedSemaphore/2constructor-08.adoc[TimedSemaphore](
    int count,
    xref:BloombergLP/bsls/SystemClockType/Enum.adoc[bsls::SystemClockType::Enum] clockType = bsls&colon;&colon;SystemClockType&colon;&colon;e&lowbar;REALTIME);
----

[.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-08.adoc[_» more&period;&period;&period;_]#

Create a timed semaphore initially having the specified `count`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0f.adoc[TimedSemaphore](
    int count,
    std::chrono::steady&lowbar;clock const& steadyClock);
----

[.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0f.adoc[_» more&period;&period;&period;_]#

Create a timed semaphore initially having the specified `count`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslmt/TimedSemaphore/2constructor-03.adoc[TimedSemaphore](
    int count,
    std::chrono::system&lowbar;clock const& systemClock);
----

[.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-03.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *clockType*
| clock used to interpret `timedWait` timeouts
| *steadyClock*
| tag selecting the system monotonic clock
| *systemClock*
| tag selecting the system realtime clock
| *count*
| initial count of the semaphore
|===


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