Subject: bug#35400: 27.0.50; Timers repeated after waking from suspend

From: Eli Zaretskii <[email-masked]>
Date: Tue, 02 Feb 2021 17:32:38 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: Stefan Monnier <[email-masked]>,  [email-masked]
> Date: Tue, 02 Feb 2021 15:34:11 +0100
> 
> > I think you can already control this by customizing the value of
> > timer-max-repeats.  It is 10 by default, so you should never see more
> > than 10 repetitions, no matter how long was Emacs suspended.
> 
> Right, so the only question here is whether to change the value of that
> variable (to not repeat).  I think that would certainly be less
> surprising, but I'm not sure whether that would break people's code or
> not?

There are two use cases here.  One is the one we have been discussing:
when Emacs wakes from suspension, or the machine wakes from sleep.
The other is that somehow Emacs didn't get CPU to run, due to some
expensive processing on the system.  It might be that people expect
timers not to try to make up for the sleep or suspension period, but
they may want them to make up for the second use case.

So maybe this should be a property of the timer itself?  Or maybe the
time elapsed since the last timer invocation should be the factor upon
which to decide whether to run more than once or not?