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

Function timer_status_change

DemoPrograms/Demo_Timer_Periodic.py:23–43  ·  view source on GitHub ↗

Encapsulates/manages the timers dictionary :param timer_id: ID of timer to change status :type timer_id: int :param start: Set to True when timer is started :type start: bool :param stop: Set to True when timer is stopped :type stop: bool :param delete:

(timer_id, start=None, stop=None, delete=None)

Source from the content-addressed store, hash-verified

21
22
23def timer_status_change(timer_id, start=None, stop=None, delete=None):
24 """
25 Encapsulates/manages the timers dictionary
26
27 :param timer_id: ID of timer to change status
28 :type timer_id: int
29 :param start: Set to True when timer is started
30 :type start: bool
31 :param stop: Set to True when timer is stopped
32 :type stop: bool
33 :param delete: Set to True to delete a timer
34 :type delete bool
35 """
36 global timer_running
37
38 if start:
39 timer_running[timer_id] = True
40 if stop:
41 timer_running[timer_id] = False
42 if delete:
43 del timer_running[timer_id]
44
45
46def timer_is_running(timer_id):

Callers 2

periodic_timer_threadFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected