0

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.

Mark Lin
  • 89
  • 6

1 Answers1

-1

Hope this helps, https://www.geeksforgeeks.org/create-stopwatch-using-python/

It is actually a stopwatch program which includes hour, minute and second, it has three buttons start, stop and reset with their respective functions.