unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Repeating timers and suspending the computer
Date: Fri, 09 Dec 2022 06:20:22 +0100	[thread overview]
Message-ID: <87r0x9dug9.fsf@mbork.pl> (raw)

Hi all,

assume that I said

(run-with-timer 0 1
                (lambda () (message "%s" (format-time-string "%H:%M:%S.%3N"))))

and put my laptop in the "sleep mode" for 20 seconds.  How many time
messages should I get?  Assume `timer-max-repeats' is 10 (which seems to
be the default).

When I did the experiment, it seemed that the timer'd function was run
/twice/ after waking up, which looks really strange -- why two times?

Best,

-- 
Marcin Borkowski
http://mbork.pl



             reply	other threads:[~2022-12-09  5:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09  5:20 Marcin Borkowski [this message]
2022-12-09  7:25 ` Repeating timers and suspending the computer 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
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=87r0x9dug9.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --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).