APPROVE COMMIT 21.4
Thanks for the patch - it will appear in 21.4.15.
Katsumi Yamaoka <yamaoka(a)jpl.org> writes:
I read itimer.el thoroughly and made a patch fixing the bug on
which start-itimer does not work as the value specified by the
first argument TIME when other timers are running. This bug is
brought about because the difference of the present time and the
time when the itimer driver was woken up will be subtracted from
the specified value TIME. I solved it by adding the difference
to TIME beforehand. It is helpful to run-at-time as well.
Don't forget to load itimer.elc when you test it. :)
2003-12-12 Katsumi Yamaoka <yamaoka(a)jpl.org>
* itimer.el (activate-itimer): Modify the itimer timeout value as
if it were begun at the last time when the itimer driver was woken
--- itimer.el~ 2001-04-12 18:21:28 +0000
+++ itimer.el 2003-12-12 00:43:13 +0000
＠＠ -406,6 +406,14 ＠＠
(error "itimer named \"%s\" already existing and activated"
(let ((inhibit-quit t))
+ (if itimer-timer
+ ;; Modify the itimer timeout value as if it were begun
+ ;; at the last time when the itimer driver was woken up.
+ (+ (itimer-value itimer)
+ (itimer-time-difference (current-time)
;; add the itimer to the global list
(setq itimer-list (cons itimer itimer-list))
;; If the itimer process is scheduled to wake up too late for