: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)
| 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): |