From: Marcin Borkowski <mbork@mbork.pl>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Repeating timers and suspending the computer
Date: Wed, 14 Dec 2022 21:13:37 +0100 [thread overview]
Message-ID: <87pmcld9qm.fsf@mbork.pl> (raw)
In-Reply-To: <83pmcnpjqr.fsf@gnu.org>
On 2022-12-13, at 13:32, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Marcin Borkowski <mbork@mbork.pl>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Tue, 13 Dec 2022 06:16:53 +0100
>>
>> ;; If real time has jumped forward,
>> ;; perhaps because Emacs was suspended for a long time,
>> ;; limit how many times things get repeated.
>> (if (and (numberp timer-max-repeats)
>> (time-less-p (timer--time timer) nil))
>> (let ((repeats (/ (timer-until timer nil)
>> (timer--repeat-delay timer))))
>> (if (> repeats timer-max-repeats)
>> (timer-inc-time timer (* (timer--repeat-delay timer)
>> repeats)))))
>> --8<---------------cut here---------------end--------------->8---
>>
>> Do I get it correctly that this means that of the scheduled number of
>> repeats is /less/ than `timer-max-repeats', then all of them get
>> executed, but when it is greater than that, only one of them is?
>
> That's the idea, yes.
Thanks. Any ideas how to rephrase the manual so that it is unambiguous?
Best,
--
Marcin Borkowski
http://mbork.pl
next prev parent reply other threads:[~2022-12-14 20:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 5:20 Repeating timers and suspending the computer Marcin Borkowski
2022-12-09 7:25 ` Eli Zaretskii
2022-12-10 4:48 ` Emanuel Berg
2022-12-10 21:39 ` Marcin Borkowski
2022-12-11 6:52 ` Eli Zaretskii
2022-12-13 5:16 ` Marcin Borkowski
2022-12-13 12:32 ` Eli Zaretskii
2022-12-14 20:13 ` Marcin Borkowski [this message]
2022-12-15 6:11 ` Eli Zaretskii
2022-12-15 15:28 ` Marcin Borkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmcld9qm.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).