scheduleRecurringEvent overloads

Synopses

Declared in <bdlmt_eventscheduler.h>

Schedule a recurring event that invokes the specified callback at every specified interval truncated to microseconds, with the first event dispatched at the optionally specified startEpochTime truncated to microseconds. If startEpochTime is not specified, the first event is dispatched at one interval from now. Load into the optionally specified event a handle that can be used to cancel the event (by invoking cancelEvent). The startEpochTime is an absolute time represented as an interval from some epoch, which is determined by the clock indicated at construction (see {Supported Clock Types} in the component documentation). The behavior is undefined unless interval is at least one microsecond. Note that if startEpochTime is in the past, the first event is dispatched immediately, and additional (now() ‐ startEpochTime) / interval events will be submitted serially.

void
scheduleRecurringEvent(
    bsls::TimeInterval const& interval,
    bsl::function<void()> const& callback,
    bsls::TimeInterval const& startEpochTime = bsls::TimeInterval(0));

Schedule a recurring event that invokes the specified callback at every specified interval truncated to microseconds, with the first event dispatched at the optionally specified startEpochTime truncated to microseconds. If startEpochTime is not specified, the first event is dispatched at one interval from now. Load into the optionally specified event a handle that can be used to cancel the event (by invoking cancelEvent). The startEpochTime is an absolute time represented as an interval from some epoch, which is determined by the clock associated with the time point. The behavior is undefined unless interval is at least one microsecond. Note that if startEpochTime is in the past, the first event is dispatched immediately, and additional (now() ‐ startEpochTime) / interval events will be submitted serially.

template<
    class t_CLOCK,
    class t_REP_TYPE,
    class t_PERIOD_TYPE,
    class t_DURATION>
void
scheduleRecurringEvent(
    bsl::chrono::duration<t_REP_TYPE, t_PERIOD_TYPE> const& interval,
    bsl::function<void()> const& callback,
    bsl::chrono::time_point<t_CLOCK, t_DURATION> const& startEpochTime = t_CLOCK::now());

Same as the preceding overload, loading a cancel handle into event.

void
scheduleRecurringEvent(
    RecurringEventHandle* event,
    bsls::TimeInterval const& interval,
    bsl::function<void()> const& callback,
    bsls::TimeInterval const& startEpochTime = bsls::TimeInterval(0));

Same as the preceding overload, loading a cancel handle into event.

template<
    class t_CLOCK,
    class t_REP_TYPE,
    class t_PERIOD_TYPE,
    class t_DURATION>
void
scheduleRecurringEvent(
    RecurringEventHandle* event,
    bsl::chrono::duration<t_REP_TYPE, t_PERIOD_TYPE> const& interval,
    bsl::function<void()> const& callback,
    bsl::chrono::time_point<t_CLOCK, t_DURATION> const& startEpochTime = t_CLOCK::now());

Created with MrDocs