I am making a game in py2.7 and I want to know how to create a timer running in the background of my code and when time is up, a command is executed. Any help is appreciated.
You probably want threading.Timer. The sched module might also be useful.