info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Idle Time to Poll Serve


From: Eric Abrahamsen
Subject: Re: Idle Time to Poll Serve
Date: Thu, 20 Feb 2020 09:44:39 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]