Skip to content

TimeMonitor

QuantConnect.Scheduling.TimeMonitor

TimeMonitor(monitor_interval_ms: int = 100)

Bases: Object, IDisposable

Helper class that will monitor timer consumers and request more time if required. Used by IsolatorLimitResultProvider

Creates a new instance

time_consumers

time_consumers: List[TimeConsumer]

List to store the coming TimeConsumer objects

This codeEntityType is protected.

count

count: int

Returns the number of time consumers currently being monitored

add

add(consumer: TimeConsumer) -> None

Adds a new time consumer element to be monitored

Parameters:

Name Type Description Default
consumer TimeConsumer

Time consumer instance

required

dispose

dispose() -> None

Disposes of the inner timer

process_consumer

process_consumer(consumer: TimeConsumer) -> None

Process the TimeConsumer object in TimeConsumers list

This codeEntityType is protected.

Parameters:

Name Type Description Default
consumer TimeConsumer

The TimeConsumer object to be processed

required

remove_all

remove_all() -> None

Remove all TimeConsumer objects where the Finished field is marked as true

This codeEntityType is protected.