[#BloombergLP-bslmt-Latch-timedWait-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Latch.adoc[Latch]::timedWait :relfileprefix: ../../../ :mrdocs: `timedWait` overloads == Synopses Declared in `<bslmt_latch.h>` Block until the number of events that this latch is waiting for reaches 0, or until the specified `absTime` timeout expires. Return 0 on success, `e_TIMED_OUT` on timeout, and a non‐zero value different from `e_TIMED_OUT` if an error occurs. Errors are unrecoverable. After an error, the latch may be destroyed, but any other use has undefined behavior. `absTime` is an _absolute_ time represented as an interval from some epoch as determined by the clock specified at construction (see {Supported Clock‐Types} in the component‐level documentation). Note that a return value of 0 does not guarantee this object is safe to destroy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int xref:BloombergLP/bslmt/Latch/timedWait-04.adoc[timedWait](xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& absTime); ---- [.small]#xref:BloombergLP/bslmt/Latch/timedWait-04.adoc[_» more..._]# Block until the number of events that this latch is waiting for reaches 0, or until the specified `absTime` timeout expires. Return 0 on success, `e_TIMED_OUT` on timeout, and a non‐zero value different from `e_TIMED_OUT` if an error occurs. Errors are unrecoverable. After an error, the latch may be destroyed, but any other use has undefined behavior. `absTime` is an _absolute_ time represented as an interval from some epoch, which is determined by the clock associated with the time point. Note that a return value of 0 does not guarantee this object is safe to destroy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class CLOCK, class DURATION> int xref:BloombergLP/bslmt/Latch/timedWait-0b.adoc[timedWait](bsl::chrono::time_point<CLOCK, DURATION> const& absTime); ---- [.small]#xref:BloombergLP/bslmt/Latch/timedWait-0b.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#