MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / __init__

Method __init__

PySimpleGUI/PySimpleGUI.py:9716–9731  ·  view source on GitHub ↗

:param window: The window to send events to :type window: Window :param frequency_ms: How often to send events in milliseconds :type frequency_ms: int :param repeating: If True then the timer will run, repeatedly sending events

(self, window, frequency_ms, key=EVENT_TIMER, repeating=True)

Source from the content-addressed store, hash-verified

9714 active_timers = {} # type: dict[int , _TimerPeriodic]
9715
9716 def __init__(self, window, frequency_ms, key=EVENT_TIMER, repeating=True):
9717 """
9718 :param window: The window to send events to
9719 :type window: Window
9720 :param frequency_ms: How often to send events in milliseconds
9721 :type frequency_ms: int
9722 :param repeating: If True then the timer will run, repeatedly sending events, until stopped
9723 :type repeating: bool
9724 """
9725 self.window = window
9726 self.frequency_ms = frequency_ms
9727 self.repeating = repeating
9728 self.key = key
9729 self.id = _TimerPeriodic.id_counter
9730 _TimerPeriodic.id_counter += 1
9731 self.start()
9732
9733 @classmethod
9734 def stop_timer_with_id(cls, timer_id):

Callers

nothing calls this directly

Calls 1

startMethod · 0.95

Tested by

no test coverage detected