Thank you for your replies! Great explanations.
But, and I am truly sorry for this, I seem to have forgotten a major detail in my wishes in the first post: I actually meant that the game should automatically go to the layout after 30 seconds of complete silence;
In other words: I need to make something that makes sure that when there hasn't been touched a single button for 30 seconds, it goes to the layout 'titlescreen'.
I believe both your theories work and can be of practical use in this situation, only I need to add the fact that no button is touched whatsoever for 30 seconds.
I figured I could use a combination between tulamide's way and the_chosen_bite's way to do this, right? Like, every tick the system adds some milliseconds to the global variable timer (the amount depending on the fps) and when any button is touched, it sets the timer to 0. Only when for 20 seconds no button has been touched, it will automatically go to the titlescreen, right?