[#BloombergLP-bslmt-ThreadUtilImpl-04-microSleep] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtilImpl-04.adoc[ThreadUtilImpl<Platform::PosixThreads>]::microSleep :relfileprefix: ../../../ :mrdocs: Suspend the current thread for at least the specified duration. == Synopsis Declared in `<bslmt_threadutilimpl_pthread.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int microSleep( int microseconds, int seconds = 0, xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval]* unsleptTime = 0); ---- == Description Suspend execution of the current thread for a period of at least the optionally specified `seconds` and `microseconds` (relative time), and optionally load into the optionally specified `unsleptTime` the amount of time that was not slept by this function if the operation was interrupted by a signal. Return 0 on success, and non‐zero if the operation was interrupted by a signal. Note that the actual time suspended depends on many factors including system scheduling, and system timer resolution. Note that the actual time suspended depends on many factors including system scheduling, and system timer resolution. == Return Value 0 on success, and non‐zero if interrupted by a signal == Parameters [cols="1,4"] |=== | Name| Description | *microseconds* | additional microseconds to sleep | *seconds* | seconds to sleep; defaults to 0 | *unsleptTime* | if non‐null, receives any remaining unslept time |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#