GNU bug report logs -
#35400
27.0.50; Timers repeated after waking from suspend
Previous Next
Full log
Message #20 received at 35400 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> So maybe this should be a property of the timer itself?
Yeah, that sounds like a good idea.
> I think for the case where we missed some timer repetitions, the best
> thing we can do is not to call that timer repeatedly but instead to call
> it once and pass it the number of times it has fired since the last time
> we ran it (so it can then freely decide to repeat its operation N times
> or not).
>
> A related issue is that for many timers, rather than "repeat every
> N seconds" we'd rather want "wait N seconds between invocations" (so if
> the execution of the timer terminates M seconds after the time T it was
> supposed to start running, the next execution should not be scheduled
> for T+N but T+M+N).
That's true. I think the current way code deals with this is to ask
Emacs to repeat once, and then the function itself computes the next
delay, and then runs `run-at-time' itself (see for instance
`image-animate-timeout').
Having `run-at-time' compute this would be an improvement -- not at
least because it would be one single timer function, and you could
inspect it from `list-timers', which you can't really do today in this
scenario (because it's a new timer on every update).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.