From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Richmond <dnomhcir@gmx.com>
Cc: info-gnus-english@gnu.org
Subject: Re: Idle Time to Poll Serve
Date: Thu, 20 Feb 2020 09:44:39 -0800 [thread overview]
Message-ID: <87zhdd6tmg.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <48946.8263041758$1582218959@news.gmane.org> (Richmond's message of "Thu, 20 Feb 2020 17:15:43 +0000")
Richmond <dnomhcir@gmx.com> writes:
> I've modified the script so that it does not check the servers and I
> think I see the problem:
>
> News checked at Thu Feb 20 16:41:01 2020
> News checked at Thu Feb 20 16:46:01 2020
> News checked at Thu Feb 20 16:51:01 2020
> News checked at Thu Feb 20 17:00:41 2020
> News checked at Thu Feb 20 17:05:41 2020 [2 times]
> News checked at Thu Feb 20 17:10:41 2020 [3 times]
>
> It is checking multiple times. Why is it doing that?
>
> (defun news-check ()
> (message "News checked at %s" (current-time-string))
> (setq result (run-with-idle-timer (time-add (current-idle-time) 300)
> t (lambda () (news-check))))
> )
>
> (defun tell-me-news ()
> (interactive)
> (setq result (run-with-idle-timer 300 t (lambda () (news-check))))
> (message "timer result %s" result)
> )
Why two timers? Why recursive? I don't have time (or patience!) to
unpick exactly what's happening here, but I would suggest starting with
the simplest possible solution and making that work first.
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
next prev parent reply other threads:[~2020-02-20 17:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 14:05 Richmond
2020-02-20 16:41 ` Eric Abrahamsen
2020-02-20 16:52 ` Richmond
2020-02-20 17:15 ` Richmond
2020-02-20 17:44 ` Eric Abrahamsen [this message]
2020-02-20 18:25 ` Adam Sjøgren via info-gnus-english
2020-02-20 22:02 ` Richmond
2020-02-21 7:35 ` Adam Sjøgren via info-gnus-english
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhdd6tmg.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=dnomhcir@gmx.com \
--cc=info-gnus-english@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 NNTP newsgroup(s).