[#BloombergLP-bdlmt-EventScheduler-2constructor-046]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/EventScheduler.adoc[EventScheduler]::EventScheduler
:relfileprefix: ../../../
:mrdocs:

Create a named event scheduler using the specified `clockType`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
EventScheduler(
    xref:BloombergLP/bsls/SystemClockType/Enum.adoc[bsls::SystemClockType::Enum] clockType,
    std::string&lowbar;view const& eventSchedulerName,
    xref:BloombergLP/bdlm/MetricsRegistry.adoc[bdlm::MetricsRegistry]* metricsRegistry,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Create an event scheduler using the default dispatcher functor (see &lcub;The Dispatcher Thread and the Dispatcher Functor&rcub; in the component&hyphen;level documentation), using the specified `clockType` to indicate the epoch used for all time intervals (see &lcub;Supported Clock Types&rcub; in the component documentation), the specified `eventSchedulerName` to be used to identify this event scheduler, and the specified `metricsRegistry` to be used for reporting metrics&period; If `metricsRegistry` is 0, `bdlm&colon;&colon;MetricsRegistry&colon;&colon;singleton()` is used&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *clockType*
| clock used to interpret time intervals
| *eventSchedulerName*
| name identifying this scheduler
| *metricsRegistry*
| metrics registry, or singleton if 0
| *basicAllocator*
| allocator used to supply memory
|===


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