I'm curious whether is there some kind of time-out for methods so I can for example repeat the method after 50 seconds of acting like being idle.
This SO answer achieves this using signal.alarm
, but I'm on Windows so this isn't available.
The only thing that comes to mind is to use time.now()
and another thread, but it doesn't feel very effective.
Is there a better way?