[#BloombergLP-bslmt-ConditionImpl-00-timedWait]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ConditionImpl-00.adoc[ConditionImpl&lt;Platform::PosixThreads&gt;]::timedWait
:relfileprefix: ../../../
:mrdocs:

Atomically unlock the specified `mutex` and suspend execution of the current thread until this condition object is &quot;signaled&quot; (i&period;e&period;, one of the `signal` or `broadcast` methods is invoked on this object) or until the specified `absTime` timeout expires, then re&hyphen;acquire a lock on the `mutex`&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&hyphen;level documentation), and is the earliest time at which the timeout may occur&period; The `mutex` remains locked by the calling thread upon returning from this function&period; Return 0 on success, `e&lowbar;TIMED&lowbar;OUT` on timeout, and a non&hyphen;zero value different from `e&lowbar;TIMED&lowbar;OUT` if an error occurs&period; The behavior is undefined unless `mutex` is locked by the calling thread prior to calling this method&period; Note that spurious wakeups are rare but possible, i&period;e&period;, this method may succeed (return 0) and return control to the thread without the condition object being signaled&period; Also note that the actual time of the timeout depends on many factors including system scheduling and system timer resolution, and may be significantly later than the time requested&period;

== Synopsis

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

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


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