Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService Class Reference

Allows to setup a real time scheduled event, internally using a Thread, that is guaranteed to trigger at or after the requested time, never before. More...

Inheritance diagram for QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService:
[legend]

Public Member Functions

 RealTimeScheduleEventService (ITimeProvider timeProvider)
 Creates a new instance More...
 
void ScheduleEvent (TimeSpan dueTime, DateTime utcNow)
 Schedules a new event More...
 
void Dispose ()
 Disposes of the underlying Timer instance More...
 

Events

EventHandler NewEvent
 Event fired when the scheduled time is past More...
 

Detailed Description

Allows to setup a real time scheduled event, internally using a Thread, that is guaranteed to trigger at or after the requested time, never before.

This class is of value because Timer could fire the event before time.

Definition at line 29 of file RealTimeScheduleEventService.cs.

Constructor & Destructor Documentation

◆ RealTimeScheduleEventService()

QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService.RealTimeScheduleEventService ( ITimeProvider  timeProvider)

Creates a new instance

Parameters
timeProviderThe time provider to use

Definition at line 45 of file RealTimeScheduleEventService.cs.

Here is the call graph for this function:

Member Function Documentation

◆ ScheduleEvent()

void QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService.ScheduleEvent ( TimeSpan  dueTime,
DateTime  utcNow 
)

Schedules a new event

Parameters
dueTimeThe desired due time
utcNowCurrent utc time

Scheduling a new event will try to disable previous scheduled event, but it is not guaranteed.

Definition at line 98 of file RealTimeScheduleEventService.cs.

Here is the caller graph for this function:

◆ Dispose()

void QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService.Dispose ( )

Disposes of the underlying Timer instance

Definition at line 110 of file RealTimeScheduleEventService.cs.

Event Documentation

◆ NewEvent

EventHandler QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService.NewEvent

Event fired when the scheduled time is past

Definition at line 39 of file RealTimeScheduleEventService.cs.


The documentation for this class was generated from the following file: