[#BloombergLP-bslmt-Barrier-timedWait-035] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Barrier.adoc[Barrier]::timedWait :relfileprefix: ../../../ :mrdocs: Arrive and block until the required number of arrivals have occurred, or until the specified `absTime` timeout expires. In the former case, _signal_ all the threads that are currently waiting on this barrier to unblock, reset the state of this barrier to its initial state, and return 0. If this method times out before the required number of arrivals, the thread is released to proceed and ceases to contribute to the number of arrivals, and `e_TIMED_OUT` is returned. Any other return value indicates that an error has occurred. Errors are unrecoverable. After an error, the barrier 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 `timedWait` and `wait` should not generally be used together; if one or more threads called `wait` while others called `timedWait`, then if the thread(s) that called `timedWait` were to time out and not retry, the threads that called `wait` would never unblock. == Synopsis Declared in `<bslmt_barrier.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class CLOCK, class DURATION> int timedWait(bsl::chrono::time_point<CLOCK, DURATION> const& absTime); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#