[#BloombergLP-bslmt-ChronoUtil-timedWait-0b]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ChronoUtil.adoc[ChronoUtil]::timedWait
:relfileprefix: ../../../
:mrdocs:

`timedWait` overloads

== Synopses

Declared in `&lt;bslmt&lowbar;chronoutil&period;h&gt;`

Block on the specified `primitive` object of the (template parameter) `PRIMITIVE` type by calling its `timedWait` method, passing a timeout calculated from the specified `absTime`&period; `absTime` is an _absolute_ time represented by a time point with respect to some epoch, which is determined by the clock associated with the time point&period; Return 0 on success, `PRIMITIVE&colon;&colon;e&lowbar;TIMED&lowbar;OUT` if the `absTime` timeout expired, and other return values on error&period; The `timedWait` method of `primitive` is called only once if the clock type specified by the (template parameter) type `CLOCK` corresponds to the clock used by `primitive`, and may be called more than once otherwise&period; Note that error codes returned from this method, necessarily distinct from 0 and `PRIMITIVE&colon;&colon;e&lowbar;TIMED&lowbar;OUT`, are defined by `PRIMITIVE`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class PRIMITIVE,
    class CLOCK,
    class DURATION&gt;
static
int
xref:BloombergLP/bslmt/ChronoUtil/timedWait-06.adoc[timedWait](
    PRIMITIVE* primitive,
    bsl::chrono::time&lowbar;point&lt;CLOCK, DURATION&gt; const& absTime);
----

[.small]#xref:BloombergLP/bslmt/ChronoUtil/timedWait-06.adoc[_» more&period;&period;&period;_]#

Block on the specified `primitive` object of the (template parameter) `PRIMITIVE` type by calling its `timedWait` method, passing the specified `argument` of the (template parameter) `ARG&lowbar;TYPE` and a timeout calculated from the specified `absTime`&period; `absTime` is an _absolute_ time represented by a time point with respect to some epoch, which is determined by the clock associated with the time point&period; Return 0 on success, `PRIMITIVE&colon;&colon;e&lowbar;TIMED&lowbar;OUT` if the `absTime` timeout expired, and other return values on error&period; The `timedWait` method of `primitive` is called only once if the clock type specified by the (template parameter) type `CLOCK` corresponds to the clock used by `primitive`, and may be called more than once otherwise&period; Note that error codes returned from this method, necessarily distinct from 0 and `PRIMITIVE&colon;&colon;e&lowbar;TIMED&lowbar;OUT`, are defined by `PRIMITIVE`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class PRIMITIVE,
    class ARG&lowbar;TYPE,
    class CLOCK,
    class DURATION&gt;
static
int
xref:BloombergLP/bslmt/ChronoUtil/timedWait-0a.adoc[timedWait](
    PRIMITIVE* primitive,
    ARG&lowbar;TYPE* argument,
    bsl::chrono::time&lowbar;point&lt;CLOCK, DURATION&gt; const& absTime);
----

[.small]#xref:BloombergLP/bslmt/ChronoUtil/timedWait-0a.adoc[_» more&period;&period;&period;_]#


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