[#CThreadInterrupt-sleep_for]
= xref:CThreadInterrupt.adoc[CThreadInterrupt]::sleep&lowbar;for
:relfileprefix: ../
:mrdocs:

Sleep for the given duration, returning early if interrupted&period;

== Synopsis

Declared in `&lt;util&sol;threadinterrupt&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f9525cc9ed8), requires&lowbar;capability(0x7f9522463dc8), requires&lowbar;capability(0x7f950e1b6ac8), requires&lowbar;capability(0x7f9522ffa198), requires&lowbar;capability(0x7f950a047888), requires&lowbar;capability(0x7f950208a9b8), requires&lowbar;capability(0x7f9527a0c8c8), requires&lowbar;capability(0x7f95220d8fd8), requires&lowbar;capability(0x7f9527a73298), requires&lowbar;capability(0x7f950f393f98), requires&lowbar;capability(0x7f950d46ef98), requires&lowbar;capability(0x7f951d595cd8), requires&lowbar;capability(0x7f9517b79d28), requires&lowbar;capability(0x7f950a205f88), requires&lowbar;capability(0x7f9523c31f78), requires&lowbar;capability(0x7f951d2a5e18), requires&lowbar;capability(0x7f9526790e48), requires&lowbar;capability(0x7f95016626b8), requires&lowbar;capability(0x7f95082cadc8), requires&lowbar;capability(0x7f951fe84248), requires&lowbar;capability(0x7f95069813b8), requires&lowbar;capability(0x7f9514952c88), requires&lowbar;capability(0x7f95157bc438)&rsqb;&rsqb;
virtual
bool
sleep&lowbar;for(Clock::duration rel&lowbar;time);
----

== Return Value

true if the full duration elapsed, false if the sleep was interrupted&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rel&lowbar;time*
| The duration to sleep for&period;
|===


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