[#BloombergLP-bdlmt-TimerEventScheduler-startClock] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/TimerEventScheduler.adoc[TimerEventScheduler]::startClock :relfileprefix: ../../../ :mrdocs: Schedule a recurring callback at the specified interval. == Synopsis Declared in `<bdlmt_timereventscheduler.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlmt/TimerEventScheduler/Handle.adoc[Handle] startClock( xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& interval, xref:bsl/function-0a.adoc[bsl::function<void()>] const& callback, xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& startTime = bsls::TimeInterval(0)); ---- == Description Schedule a recurring event that invokes the specified `callback` at every specified `interval`, starting at the optionally specified `startTime`. On success, return a handle that can be use to cancel the clock (by invoking `cancelClock`), or return `e_INVALID_HANDLE` if scheduling this event would exceed the maximum number of scheduled events for this object (see constructor). If no start time is specified, it is assumed to be the `interval` time from now. The `startTime` is an absolute time represented as an interval from some epoch, which is detemined by the clock indicated at construction (see []Clock‐Types)). == Return Value a handle for the clock, or `e_INVALID_HANDLE` if the limit is exceeded == Parameters [cols="1,4"] |=== | Name| Description | *interval* | period between recurring invocations | *callback* | function invoked at each interval | *startTime* | first invocation time; the default is interval from now |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#