[#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 `<bslmt_timedsemaphore.h>` Create a timed semaphore initially having a count of 0. Optionally specify a `clockType` indicating the type of the system clock against which the `absTime` timeouts passed to the `timedWait` methods are to be interpreted (see {Supported Clock‐Types} in the component‐level documentation). If `clockType` is not specified then the realtime system clock is used. This method does not return normally unless there are sufficient system resources to construct the object. [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::SystemClockType::e_REALTIME); ---- [.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0b.adoc[_» more..._]# Create a timed semaphore initially having a count of 0. Use the monotonic system clock as the clock against which the `absTime` timeouts passed to the `timedWait` methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bslmt/TimedSemaphore/2constructor-04.adoc[TimedSemaphore](std::chrono::steady_clock const&); ---- [.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-04.adoc[_» more..._]# Create a timed semaphore initially having a count of 0. Use the realtime system clock as the clock against which the `absTime` timeouts passed to the `timedWait` methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0a1.adoc[TimedSemaphore](std::chrono::system_clock const&); ---- [.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0a1.adoc[_» more..._]# Create a timed semaphore initially having the specified `count`. Optionally specify a `clockType` indicating the type of the system clock against which the `absTime` timeouts passed to the `timedWait` methods are to be interpreted (see {Supported Clock‐Types} in the component‐level documentation). If `clockType` is not specified then the realtime system clock is used. This method does not return normally unless there are sufficient system resources to construct the object. The behavior is undefined unless `0 <= count`. [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::SystemClockType::e_REALTIME); ---- [.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-08.adoc[_» more..._]# Create a timed semaphore initially having the specified `count`. Use the monotonic system clock as the clock against which the `absTime` timeouts passed to the `timedWait` methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object. The behavior is undefined unless `0 <= count`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0f.adoc[TimedSemaphore]( int count, std::chrono::steady_clock const&); ---- [.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0f.adoc[_» more..._]# Create a timed semaphore initially having the specified `count`. Use the realtime system clock as the clock against which the `absTime` timeouts passed to the `timedWait` methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object. The behavior is undefined unless `0 <= count`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslmt/TimedSemaphore/2constructor-03.adoc[TimedSemaphore]( int count, std::chrono::system_clock const&); ---- [.small]#xref:BloombergLP/bslmt/TimedSemaphore/2constructor-03.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#