[#BloombergLP-bslmt-ThreadUtilImpl-04-sleepUntil-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtilImpl-04.adoc[ThreadUtilImpl&lt;Platform::PosixThreads&gt;]::sleepUntil
:relfileprefix: ../../../
:mrdocs:

`sleepUntil` overloads

== Synopses

Declared in `&lt;bslmt&lowbar;threadutilimpl&lowbar;pthread&period;h&gt;`

Suspend execution of the current thread until the specified `absoluteTime`&period; Optionally specify `clockType` which determines the epoch from which the interval `absoluteTime` is measured (see &lcub;Supported Clock&hyphen;Types&rcub; in the component documentation)&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The behavior is undefined unless `absoluteTime` represents a time after January 1, 1970 and before the end of December 31, 9999 (i&period;e&period;, a time interval greater than or equal to 0, and less than 253,402,300,800 seconds)&period; Note that the actual time suspended depends on many factors including system scheduling and system timer resolution&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bslmt/ThreadUtilImpl-04/sleepUntil-0f.adoc[sleepUntil](
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& absoluteTime,
    xref:BloombergLP/bsls/SystemClockType/Enum.adoc[bsls::SystemClockType::Enum] clockType = bsls&colon;&colon;SystemClockType&colon;&colon;e&lowbar;REALTIME);
----

[.small]#xref:BloombergLP/bslmt/ThreadUtilImpl-04/sleepUntil-0f.adoc[_» more&period;&period;&period;_]#

Suspend execution of the current thread until the specified `absoluteTime`&period; Optionally specify `retryOnSignalInterrupt` indicating whether to put this thread to sleep again if the operating system interrupts the sleep because of a signal&period; Optionally specify `clockType` which determines the epoch from which the interval `absoluteTime` is measured (see &lcub;Supported Clock&hyphen;Types&rcub; in the component documentation)&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; If `retryOnSignalInterrupt` is `true`, an interrupt from a signal will be ignored and the current the thread will be put back to sleep until `absoluteTime`, otherwise this call will return 0 to the calling thread immediately&period; The behavior is undefined unless `absoluteTime` represents a time after January 1, 1970 and before the end of December 31, 9999 (i&period;e&period;, a time interval greater than or equal to 0, and less than 253,402,300,800 seconds)&period; Note that the actual time suspended depends on many factors including system scheduling and system timer resolution&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bslmt/ThreadUtilImpl-04/sleepUntil-03.adoc[sleepUntil](
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& absoluteTime,
    bool retryOnSignalInterrupt = false,
    xref:BloombergLP/bsls/SystemClockType/Enum.adoc[bsls::SystemClockType::Enum] clockType = bsls&colon;&colon;SystemClockType&colon;&colon;e&lowbar;REALTIME);
----

[.small]#xref:BloombergLP/bslmt/ThreadUtilImpl-04/sleepUntil-03.adoc[_» more&period;&period;&period;_]#


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