[#BloombergLP-bslmt-FastPostSemaphore-timedWait-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/FastPostSemaphore.adoc[FastPostSemaphore]::timedWait
:relfileprefix: ../../../
:mrdocs:

If this semaphore is initially disabled, or becomes disabled while blocking, return `e&lowbar;DISABLED` with no effect on the count&period; Otherwise, block until the count of this semaphore is a positive value or the specified `absTime` timeout expires&period; If the count of this semaphore is a positive value, return 0 and atomically decrement the count&period; If the `absTime` timeout expires, return `e&lowbar;TIMEDOUT` with no effect on the count&period; Return `e&lowbar;FAILED` if an error occurs&period; Errors are unrecoverable&period; After an error, the semaphore may be destroyed, but any other use has undefined behavior&period; `absTime` is an _absolute_ time represented as an interval from some epoch, which is determined by the clock indicated at construction (see &lcub;Supported Clock&hyphen;Types&rcub; in the component documentation)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CLOCK,
    class DURATION&gt;
int
timedWait(bsl::chrono::time&lowbar;point&lt;CLOCK, DURATION&gt; const& absTime);
----


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