Lean
$LEAN_TAG$
|
Provides an implementation of ITimeProvider that can be manually advanced through time More...
Public Member Functions | |
ManualTimeProvider (DateTimeZone setCurrentTimeTimeZone=null) | |
Initializes a new instance of the ManualTimeProvider More... | |
ManualTimeProvider (DateTime currentTime, DateTimeZone setCurrentTimeTimeZone=null) | |
Initializes a new instance of the ManualTimeProvider class More... | |
DateTime | GetUtcNow () |
Gets the current time in UTC More... | |
void | SetCurrentTimeUtc (DateTime time) |
Sets the current time interpreting the specified time as a UTC time More... | |
void | SetCurrentTime (DateTime time) |
Sets the current time interpeting the specified time as a local time using the time zone used at instatiation. More... | |
void | Advance (TimeSpan span) |
Advances the current time by the specified span More... | |
void | AdvanceSeconds (double seconds) |
Advances the current time by the specified number of seconds More... | |
Provides an implementation of ITimeProvider that can be manually advanced through time
Definition at line 27 of file ManualTimeProvider.cs.
QuantConnect.Lean.Engine.DataFeeds.ManualTimeProvider.ManualTimeProvider | ( | DateTimeZone | setCurrentTimeTimeZone = null | ) |
Initializes a new instance of the ManualTimeProvider
setCurrentTimeTimeZone | Specify to use this time zone when calling SetCurrentTime, leave null for the default of TimeZones.Utc |
Definition at line 37 of file ManualTimeProvider.cs.
QuantConnect.Lean.Engine.DataFeeds.ManualTimeProvider.ManualTimeProvider | ( | DateTime | currentTime, |
DateTimeZone | setCurrentTimeTimeZone = null |
||
) |
Initializes a new instance of the ManualTimeProvider class
currentTime | The current time in the specified time zone, if the time zone is null then the time is interpreted as being in TimeZones.Utc |
setCurrentTimeTimeZone | Specify to use this time zone when calling SetCurrentTime, leave null for the default of TimeZones.Utc |
Definition at line 49 of file ManualTimeProvider.cs.
DateTime QuantConnect.Lean.Engine.DataFeeds.ManualTimeProvider.GetUtcNow | ( | ) |
Gets the current time in UTC
Implements QuantConnect.ITimeProvider.
Definition at line 59 of file ManualTimeProvider.cs.
void QuantConnect.Lean.Engine.DataFeeds.ManualTimeProvider.SetCurrentTimeUtc | ( | DateTime | time | ) |
Sets the current time interpreting the specified time as a UTC time
time | The current time in UTC |
Definition at line 68 of file ManualTimeProvider.cs.
void QuantConnect.Lean.Engine.DataFeeds.ManualTimeProvider.SetCurrentTime | ( | DateTime | time | ) |
Sets the current time interpeting the specified time as a local time using the time zone used at instatiation.
time | The local time to set the current time time, will be converted into UTC |
Definition at line 79 of file ManualTimeProvider.cs.
void QuantConnect.Lean.Engine.DataFeeds.ManualTimeProvider.Advance | ( | TimeSpan | span | ) |
Advances the current time by the specified span
span | The amount of time to advance the current time by |
Definition at line 88 of file ManualTimeProvider.cs.
void QuantConnect.Lean.Engine.DataFeeds.ManualTimeProvider.AdvanceSeconds | ( | double | seconds | ) |
Advances the current time by the specified number of seconds
seconds | The number of seconds to advance the current time by |
Definition at line 97 of file ManualTimeProvider.cs.