I want to make a timer that starts when i create an instance of a class, and stop the timer when a method is called. Does anyone know how to make one? I've searched up many tutorials but got no idea what they're doing or it just doesn't fit my code. When i use self.frame.destroy()
it needs to ignore the timer code so it doesn't get destroyed. The timer should include second and minutes (and milliseconds if possible). Any help will be greatly appreciated, thanks.
from tkinter import *
root = Tk()
class Start:
def __init__ (self, master):
self.master = master
#code
def timer(self):
#start timer
def end(self):
#end timer
root.mainloop()
Edit: The timer should start from 00:00:00 and not an updating clock.