[#BloombergLP-bdlmt-TimerEventScheduler-2constructor-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/TimerEventScheduler.adoc[TimerEventScheduler]::TimerEventScheduler :relfileprefix: ../../../ :mrdocs: Construct a named event scheduler with the given dispatcher and clock. == Synopsis Declared in `<bdlmt_timereventscheduler.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit TimerEventScheduler( xref:BloombergLP/bdlmt/TimerEventScheduler/Dispatcher.adoc[Dispatcher] const& dispatcherFunctor, xref:BloombergLP/bsls/SystemClockType/Enum.adoc[bsls::SystemClockType::Enum] clockType, std::string_view const& eventSchedulerName, xref:BloombergLP/bdlm/MetricsRegistry.adoc[bdlm::MetricsRegistry]* metricsRegistry, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- == Description Construct an event scheduler using the specified `dispatcherFunctor` (see "The dispatcher thread and the dispatcher functor" section in component‐level doc), use the specified `clockType` to indicate the epoch used for all time intervals (see []Clock‐Types)), the specified `eventSchedulerName` to be used to identify this event scheduler, and the specified `metricsRegistry` to be used for reporting metrics. If `metricsRegistry` is 0, `bdlm::MetricsRegistry::singleton()` is used. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. Note that the maximal number of scheduled non‐recurring events and recurring events defaults to an implementation defined constant. == Parameters [cols="1,4"] |=== | Name| Description | *dispatcherFunctor* | functor that runs dispatched callbacks | *clockType* | clock used for time intervals | *eventSchedulerName* | name identifying this scheduler | *metricsRegistry* | metrics registry, or singleton if 0 | *basicAllocator* | memory allocator; null uses the default |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#