You could create a global variable
Set(timeoutCount, 0)
and then have an invisible timer set to 1 second, repeats, and starts automatically.
OnTimerEnd: Set(timeoutCount, timeoutCount + 1)
If you have multiple screens, have a timer on each screen with the same settings.
Create a checkbox and have it set to true if timeoutCount = however many seconds you want the timeout to occur at. Once the checkbox is true, Exit() the application.