[#BloombergLP-bslmt-TimedSemaphore-timedWait-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/TimedSemaphore.adoc[TimedSemaphore]::timedWait :relfileprefix: ../../../ :mrdocs: `timedWait` overloads == Synopses Declared in `<bslmt_timedsemaphore.h>` Block until the count of this semaphore is a positive value, or until the specified `absTime` timeout expires. `absTime` is an _absolute_ time represented as an interval from some epoch, which is determined by the clock indicated at construction (see {Supported Clock‐Types} in the component‐level documentation). If the `absTime` timeout did not expire before the count attained a positive value, atomically decrement the count and return 0. If the `absTime` timeout did expire, return `e_TIMED_OUT` with no effect on the count. Any other value indicates that an error has occurred. Errors are unrecoverable. After an error, the semaphore may be destroyed, but any other use has undefined behavior. On Windows platforms, this method may return `e_TIMED_OUT` slightly before `absTime`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int xref:BloombergLP/bslmt/TimedSemaphore/timedWait-0d.adoc[timedWait](xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& absTime); ---- [.small]#xref:BloombergLP/bslmt/TimedSemaphore/timedWait-0d.adoc[_» more..._]# Block until the count of this semaphore is a positive value, or until the specified `absTime` timeout expires. `absTime` is an _absolute_ time represented by a time point with respect to some epoch, which is determined by the clock associated with the time point. If the `absTime` timeout did not expire before the count attained a positive value, atomically decrement the count and return 0. If the `absTime` timeout did expire, return `e_TIMED_OUT` with no effect on the count. Any other value indicates that an error has occurred. Errors are unrecoverable. After an error, the semaphore may be destroyed, but any other use has undefined behavior. On Windows platforms, this method may return `e_TIMED_OUT` slightly before `absTime`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class CLOCK, class DURATION> int xref:BloombergLP/bslmt/TimedSemaphore/timedWait-08.adoc[timedWait](bsl::chrono::time_point<CLOCK, DURATION> const& absTime); ---- [.small]#xref:BloombergLP/bslmt/TimedSemaphore/timedWait-08.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#