[#BloombergLP-bdlmt-EventScheduler-rescheduleEventAndWait-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/EventScheduler.adoc[EventScheduler]::rescheduleEventAndWait
:relfileprefix: ../../../
:mrdocs:

Reschedule `handle` at `newEpochTime` and wait for completion&period;

== Synopsis

Declared in `&lt;bdlmt&lowbar;eventscheduler&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;CLOCK,
    class t&lowbar;DURATION&gt;
int
rescheduleEventAndWait(
    xref:BloombergLP/bdlmt/EventScheduler/Event.adoc[Event] const* handle,
    bsl::chrono::time&lowbar;point&lt;t&lowbar;CLOCK, t&lowbar;DURATION&gt; const& newEpochTime);
----

== Description

Reschedule the event referred to by the specified `handle` at the specified `newEpochTime` truncated to microseconds&period; Block until the event having `handle` (if it is valid) is either successfully rescheduled or dispatched before the call returns&period; Return 0 on successful reschedule, and a non&hyphen;zero value if `handle` is invalid _or_ if the event has already been dispatched&period; The `newEpochTime` is an absolute time represented as an interval from some epoch, which is determined by the clock associated with the time point&period; The behavior is undefined if this method is invoked from the dispatcher thread&period;

== Return Value

0 on successful reschedule, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *handle*
| event to reschedule
| *newEpochTime*
| new absolute time at which to dispatch the event
|===


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