[#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(0x7f2e18c12e38), requires&lowbar;capability(0x7f2e32718518), requires&lowbar;capability(0x7f2e2a301618), requires&lowbar;capability(0x7f2e37b29708), requires&lowbar;capability(0x7f2e22088d28), requires&lowbar;capability(0x7f2e25f35aa8), requires&lowbar;capability(0x7f2e42e837f8), requires&lowbar;capability(0x7f2e225a5378), requires&lowbar;capability(0x7f2e36bf5ed8), requires&lowbar;capability(0x7f2e2253cd58), requires&lowbar;capability(0x7f2e2390ccd8), requires&lowbar;capability(0x7f2e1be63c88), requires&lowbar;capability(0x7f2e188a4e68), requires&lowbar;capability(0x7f2e285830a8), requires&lowbar;capability(0x7f2e26d325f8), requires&lowbar;capability(0x7f2e1d2cbdf8), requires&lowbar;capability(0x7f2e08467cd8), requires&lowbar;capability(0x7f2e1c59e9e8), requires&lowbar;capability(0x7f2e38a13698), requires&lowbar;capability(0x7f2e3302aa88), requires&lowbar;capability(0x7f2e2392c8b8), requires&lowbar;capability(0x7f2e35bed0e8), requires&lowbar;capability(0x7f2e1e8add88)&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]#
