X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fitimer.el;h=6c2d793a3f7abe7fc7612868ccd47bf6e08551e6;hb=273e8446bbdbf720291e2c533284ed987506bf83;hp=519991744c275fa002fb2916e58bf6775a2b7108;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/itimer.el b/lisp/itimer.el index 5199917..6c2d793 100644 --- a/lisp/itimer.el +++ b/lisp/itimer.el @@ -167,7 +167,7 @@ This is a macro." (defun itimer-live-p (object) "Return non-nil if OBJECT is an itimer and is active. ``Active'' means Emacs will run it when it expires. -`activate-timer' must be called on an itimer to make it active. +`activate-itimer' must be called on an itimer to make it active. Itimers started with `start-itimer' are automatically active." (and (itimerp object) (memq object itimer-list))) @@ -406,6 +406,14 @@ its FUNCTION will be called when it expires, and so on." (error "itimer named \"%s\" already existing and activated" (itimer-name itimer)))) (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. + (set-itimer-value + itimer + (+ (itimer-value itimer) + (itimer-time-difference (current-time) + itimer-timer-last-wakeup)))) ;; 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