I want to implement a logic that will execude after a while when no input was hapend. Like a screensaver that will get started after a few minutes of no mouse input.
Im using libGDX so I think I should use the Timer-Utilities. But this is a principal engine-agnostic question since Timer and Interval Classes exits for most languages and frameworks.
My first idea was to just start a countdown and than check everytime in my game loop if the input-variable has changed. If so I will reset the countdown. But this seems like a big overhead because I have to reset the whole timer in worst cases 60 times per second.
Is their a general pattern for that common problem?