WIN_CLOSED bulk update. No more test for event is None, use WIN_CLOSED instead
This commit is contained in:
parent
6174b355a6
commit
0076b461f5
135 changed files with 395 additions and 349 deletions
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
import PySimpleGUI as sg
|
||||
import time
|
||||
import random
|
||||
import psutil
|
||||
from threading import Thread
|
||||
|
@ -57,8 +56,7 @@ def main():
|
|||
last_cpu = i = 0
|
||||
prev_x, prev_y = 0, 0
|
||||
while True: # the Event Loop
|
||||
time.sleep(.5)
|
||||
event, values = window.read(timeout=0)
|
||||
event, values = window.read(timeout=500)
|
||||
if event in ('Quit', None): # always give ths user a way out
|
||||
break
|
||||
# do CPU measurement and graph it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue