hello someone can help
I built stop watch app from tutorials and i write there "time.sleep(0.7)" and because of that whole application is lagging. import time from tkinter import * from tkinter.ttk import * from threading import Thread sc = 0 mn = 0 hr = 0 stp = 0 def start(): global sc, mn, hr time.sleep(0.7) sc = sc + 1 if sc == 60: mn = mn + 1 sc = 0 if mn == 60: hr = hr + 1 mn = 0 if stp == 0: lbl = Label(root, text='%i:%i:%i' % (hr, mn, sc), font=('arial', 30, 'bold'), foreground='white', background="black", width=10) lbl.after(300, start) lbl.place(x=200, y=60) def stop(): global stp stp = 1 def res(): global sc, mn, hr, stp sc = 0 mn = 0 hr = 0 stp = 0 root = Tk() style = Style() root.title("stopwatch") root.geometry("500x500") root.resizable(False, False) root.configure(bg="black") style.configure('Tbutton', font=('arial', 10, 'bold'), borderwidth='5') button1 = Button(root, text="start", command=start).place(x=10, y=10) button2 = Button(root, text="stop", command=stop).place(x=410, y=10) button3 = Button(root, text="reset", command=res).place(x=220, y=10) root.mainloop()