It may be easier than I think, but I would like to create a timer that, having reached the limit (say, 15 minutes), executes some code.
Meanwhile, every second I would like to check the condition. If the condition is met, then the timer is reset, and the process starts again, otherwise the countdown continues.
If the condition is satisfied after the end of the countdown, some code is executed, and the timer starts the countdown again.
Does this include threading or can it be achieved with the simple time.sleep() function?
python timer counter
Chris j
source share