[#absl-Clock-AwaitWithDeadline] = xref:absl.adoc[absl]::xref:absl/Clock.adoc[Clock]::AwaitWithDeadline :relfileprefix: ../../ :mrdocs: Returns when cond is true or the deadline has passed. Returns true iff cond holds when returning. == Synopsis Declared in `<absl/time/clock_interface.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual bool AwaitWithDeadline( xref:absl/Mutex.adoc[absl::Mutex]* mu, xref:absl/Condition.adoc[absl::Condition] const& cond, xref:absl/Time.adoc[absl::Time] deadline) = 0; ---- == Description Requires *mu to be held at least in shared mode. It will be held when evaluating cond, and upon return, but it may be released and reacquired in the meantime. This method is similar to mu‐>AwaitWithDeadline() except that the latter only works with real‐time deadlines. This call works properly with simulated time if invoked on a simulated clock. == Return Value `true` iff `cond` holds when returning. == Parameters [cols="1,4"] |=== | Name| Description | *mu* | The mutex guarding `cond`, held at least in shared mode. | *cond* | The condition to wait on. | *deadline* | The time by which to stop waiting. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#