[#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&period; Returns true iff cond holds when returning&period;

== Synopsis

Declared in `&lt;absl&sol;time&sol;clock&lowbar;interface&period;h&gt;`

[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 &ast;mu to be held at least in shared mode&period; It will be held when evaluating cond, and upon return, but it may be released and reacquired in the meantime&period;

This method is similar to mu&hyphen;&gt;AwaitWithDeadline() except that the latter only works with real&hyphen;time deadlines&period; This call works properly with simulated time if invoked on a simulated clock&period;

== Return Value

`true` iff `cond` holds when returning&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *mu*
| The mutex guarding `cond`, held at least in shared mode&period;
| *cond*
| The condition to wait on&period;
| *deadline*
| The time by which to stop waiting&period;
|===


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