[#BloombergLP-bdlmt-EventSchedulerTestTimeSource] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::EventSchedulerTestTimeSource :relfileprefix: ../../ :mrdocs: Test utility that controls the clock used by an `EventScheduler`. == Synopsis Declared in `<bdlmt_eventscheduler.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class EventSchedulerTestTimeSource; ---- == Description This class provides a means to change the clock that is used by a given event‐scheduler to determine when events should be triggered. Constructing a `EventSchedulerTestTimeSource` alters the behavior of the supplied event‐scheduler. After a test time‐source is created, the underlying scheduler will run events according to a discrete timeline, whose successive values are determined by calls to `advanceTime` on the test time‐source, and can be retrieved by calling `now` on that test time‐source. Note that the "system‐time" held by a test time‐source _does_ _not_ correspond to the current system time. Test writers must use caution when scheduling absolute‐time events so that they are scheduled relative to the test time‐source's value for `now`. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/EventSchedulerTestTimeSource/2constructor.adoc[`EventSchedulerTestTimeSource`] [.small]#[constructor]# | Create a test time‐source that controls `scheduler`'s clock. | xref:BloombergLP/bdlmt/EventSchedulerTestTimeSource/advanceTime.adoc[`advanceTime`] | Advance the test clock and dispatch due events. | xref:BloombergLP/bdlmt/EventSchedulerTestTimeSource/now.adoc[`now`] | Return this object's current‐time value. | xref:BloombergLP/bdlmt/EventSchedulerTestTimeSource/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<EventSchedulerTestTimeSource, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#