[#BloombergLP-bslmt-Sluice-timedWait-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Sluice.adoc[Sluice]::timedWait
:relfileprefix: ../../../
:mrdocs:

Wait for the specified `token` to be signaled, 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 associated with the time point&period; Return 0 on success, and `e&lowbar;TIMED&lowbar;OUT` on timeout&period; Any other value indicates that an error has occurred&period; Errors are unrecoverable&period; After an error, the sluice may be destroyed, but any other use has undefined behavior&period; The `token` is released whether or not a timeout occurred&period; The behavior is undefined unless `token` was obtained from a call to `enter` by this thread, and was not subsequently released (via a call to `timedWait` or `wait`)&period;

== Synopsis

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

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


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