Ask coding questions

← Back to all posts
I need some assistance in adding a timer that will end some code without interrupting other code
JackOrso13 (0)

I would like to have a 60 or 120 second countdown for my bomb defuser project.

robowolf (436)

There are two ways to do this. First import time get the time at the start time.time() then after the defuse the bomb get time again. Then subtract the end from the start to get the total amount of time. Or you could use a timer with threading.