1

I would like to know how many seconds have passed since the last keystroke (or character that showed up in the screen, whatever is easier).

Is there a timer that is associated to self-insert-command? Alternatively, what is a simple way to achieve my goal?

3
  • Maybe have a look at how auto save works (especially, there's a variable auto-save-timeout).
    – JeanPierre
    Feb 11, 2020 at 7:54
  • Could it be that this is an X-Y-problem and you are actually looking for run-with-idle-timer? Otherwise current-idle-time does what you want.
    – Tobias
    Feb 11, 2020 at 11:05
  • 1
    @Tobias: Yes, (nth 1 (current-idle-time)) was what I was looking for. Feb 11, 2020 at 22:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.