Lean
$LEAN_TAG$
|
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...
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... | |
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.
QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService.RealTimeScheduleEventService | ( | ITimeProvider | timeProvider | ) |
Creates a new instance
timeProvider | The time provider to use |
Definition at line 45 of file RealTimeScheduleEventService.cs.
void QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService.ScheduleEvent | ( | TimeSpan | dueTime, |
DateTime | utcNow | ||
) |
Schedules a new event
dueTime | The desired due time |
utcNow | Current 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.
void QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService.Dispose | ( | ) |
Disposes of the underlying Timer instance
Definition at line 110 of file RealTimeScheduleEventService.cs.
EventHandler QuantConnect.Lean.Engine.DataFeeds.RealTimeScheduleEventService.NewEvent |
Event fired when the scheduled time is past
Definition at line 39 of file RealTimeScheduleEventService.cs.