Lean
$LEAN_TAG$
|
Real time timer class for precise callbacks on a millisecond resolution in a self managed thread. More...
Public Member Functions | |
RealTimeSynchronizedTimer () | |
Constructor for Real Time Event Driver: More... | |
RealTimeSynchronizedTimer (TimeSpan period, Action< DateTime > callback) | |
Trigger an event callback after precisely milliseconds-lapsed. This is expensive, it creates a new thread and closely monitors the loop. More... | |
void | Start () |
Start the synchronized real time timer - fire events at start of each second or minute More... | |
void | Scanner () |
Scan the stopwatch for the desired millisecond delay: More... | |
void | Pause () |
Hang the real time event: More... | |
void | Resume () |
Resume clock More... | |
void | Stop () |
Stop the real time timer: More... | |
Real time timer class for precise callbacks on a millisecond resolution in a self managed thread.
Due to the way Window's system clock works the clock is only accurate to the nearest 16ms. In linux it is accurate to the millisecond.
Definition at line 26 of file RealTimeSynchronizedTimer.cs.
QuantConnect.RealTimeSynchronizedTimer.RealTimeSynchronizedTimer | ( | ) |
Constructor for Real Time Event Driver:
Definition at line 39 of file RealTimeSynchronizedTimer.cs.
QuantConnect.RealTimeSynchronizedTimer.RealTimeSynchronizedTimer | ( | TimeSpan | period, |
Action< DateTime > | callback | ||
) |
Trigger an event callback after precisely milliseconds-lapsed. This is expensive, it creates a new thread and closely monitors the loop.
period | delay period between event callbacks |
callback | Callback event passed the UTC time the event is intended to be triggered |
Definition at line 51 of file RealTimeSynchronizedTimer.cs.
void QuantConnect.RealTimeSynchronizedTimer.Start | ( | ) |
Start the synchronized real time timer - fire events at start of each second or minute
Definition at line 64 of file RealTimeSynchronizedTimer.cs.
void QuantConnect.RealTimeSynchronizedTimer.Scanner | ( | ) |
Scan the stopwatch for the desired millisecond delay:
Definition at line 74 of file RealTimeSynchronizedTimer.cs.
void QuantConnect.RealTimeSynchronizedTimer.Pause | ( | ) |
Hang the real time event:
Definition at line 94 of file RealTimeSynchronizedTimer.cs.
void QuantConnect.RealTimeSynchronizedTimer.Resume | ( | ) |
Resume clock
Definition at line 102 of file RealTimeSynchronizedTimer.cs.
void QuantConnect.RealTimeSynchronizedTimer.Stop | ( | ) |
Stop the real time timer:
Definition at line 110 of file RealTimeSynchronizedTimer.cs.