diff --git a/Timer.py b/Timer.py new file mode 100644 index 0000000..ceb2006 --- /dev/null +++ b/Timer.py @@ -0,0 +1,18 @@ +from datetime import datetime, time + +class Timer(): + + def __init__(self): + self.startTime = 0 + + + def has_second_passed(self): + return self.get_time() > 1 + + + def get_time(self): + return str(datetime.now() - self.startTime) + + + def reset_time(self): + self.startTime = datetime.now() \ No newline at end of file