[#BloombergLP-bslmt-TimedSemaphoreImpl-04b-timedWait]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/TimedSemaphoreImpl-04b.adoc[TimedSemaphoreImpl&lt;Platform::PthreadTimedSemaphore&gt;]::timedWait
:relfileprefix: ../../../
:mrdocs:

Block until this semaphore can be acquired or `absTime` expires&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;timedsemaphoreimpl&lowbar;pthread&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
timedWait(xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& absTime);
----

== Description

Block until the count of this semaphore is a positive value, or until the specified `absTime` timeout expires&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; If the `absTime` timeout did not expire before the count attained a positive value, atomically decrement the count and return 0&semi; otherwise, return a non&hyphen;zero value with no effect on the count&period;

== Return Value

0 if acquired before timeout, or a non&hyphen;zero value if the timeout expired

== Parameters

[cols="1,4"]
|===
| Name| Description
| *absTime*
| absolute timeout from the construction clock epoch
|===


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