aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2019-04-24 18:13:04 +0300
committerEli Zaretskii2019-04-24 18:13:04 +0300
commit2b3c0ae5828810c6d24f3902bade125aee8b9e9c (patch)
tree34c9addc03749334a8ba62a2c9ced0e9546af943
parentf6e6c1744be5620ce97c8429a161ae5cf733a949 (diff)
downloademacs-2b3c0ae5828810c6d24f3902bade125aee8b9e9c.tar.gz
emacs-2b3c0ae5828810c6d24f3902bade125aee8b9e9c.zip
Fix rescheduling timers after suspension
* lisp/emacs-lisp/timer.el (timer-event-handler): Fix the comparison between next invocation time and current time.
-rw-r--r--lisp/emacs-lisp/timer.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index f706d9bc626..22ccc35103a 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -281,7 +281,7 @@ This function is called, by name, directly by the C code."
281 ;; perhaps because Emacs was suspended for a long time, 281 ;; perhaps because Emacs was suspended for a long time,
282 ;; limit how many times things get repeated. 282 ;; limit how many times things get repeated.
283 (if (and (numberp timer-max-repeats) 283 (if (and (numberp timer-max-repeats)
284 (time-less-p nil (timer--time timer))) 284 (time-less-p (timer--time timer) nil))
285 (let ((repeats (/ (timer-until timer nil) 285 (let ((repeats (/ (timer-until timer nil)
286 (timer--repeat-delay timer)))) 286 (timer--repeat-delay timer))))
287 (if (> repeats timer-max-repeats) 287 (if (> repeats timer-max-repeats)