X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fitimer.el;h=6c2d793a3f7abe7fc7612868ccd47bf6e08551e6;hb=a3c8db1e07b33da64b3af89f0c8923619e8e1ee4;hp=705df2432a7b80645cf8f0a5b6274eae386045ca;hpb=82f6d62ee211b1d36e8f45fed3ee3edde82b6916;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/itimer.el b/lisp/itimer.el index 705df24..6c2d793 100644 --- a/lisp/itimer.el +++ b/lisp/itimer.el @@ -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