MvdLaar,
maybe this is obvious, but, you'll probably want the time to restart with each input, no? So, in addition to Tulamide's events:
+Every 1ms: Add 1ms to "timer"
->On Any Key Pressed: Set Timer to 0
This way, the player isn't interrupted and reset in the middle of the game, but once they stop playing, the counter won't be reset and will trigger the "go to "titlescreen" action.