I basically need a function that, after a certain amount of time has elapsed, will restart a program from scratch. This is because the code can get stuck at a certain point if wrong decisions are made. I am curious how to go about making this. I am sure it should be quite simple. Could I just use some sort of time function for this? For example, when time = 30 seconds since last restart, the program starts over?