[#BloombergLP-bslmt-Latch-2constructor-06] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Latch.adoc[Latch]::Latch :relfileprefix: ../../../ :mrdocs: Create a latch for `count` events using the realtime clock. == Synopsis Declared in `<bslmt_latch.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- Latch( int count, std::chrono::system_clock const& systemClock); ---- == Description Create a latch that will synchronize on the specified `count` number of events, and when `count` events have been recorded will release any waiting threads. Use the realtime system clock as the clock against which the `absTime` timeouts passed to the `timedWait` methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). The behavior is undefined unless `0 <= count`. == Parameters [cols="1,4"] |=== | Name| Description | *count* | number of events required to release the latch | *systemClock* | tag selecting the system realtime clock |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#