class A:
def __call__(self, value):
rer = str(psutil.cpu_freq(percpu=False))
label6['text'] = str(psutil.cpu_percent(interval=1, percpu=False)) + '%'
label2['text'] = rer[1:]
root.after(1, start)
def start():
b = A()
x = threading.Thread(target=b, args=(1,), daemon=True)
x.start()
print(x.ident)
start()
root.mainloop()
def frequency():
rer = str(psutil.cpu_freq(percpu=False))
label2['text'] = rer[1:]
root.after(1, frequency)
def set_label():
label6['text'] = str(psutil.cpu_percent(interval=1, percpu=False)) + '%'
root.after(1, set_label)
x = threading.Thread(target=set_label(), args=(1,), daemon=True)
x.start()
y = threading.Thread(target=frequency(), args=(2,), daemon=True)
y.start()
root.mainloop()