comparison lisp/itimer.el @ 2284:17dfe8e3aead

[xemacs-hg @ 2004-09-20 18:11:33 by james] Katsumi's fix to make itimers wake up at the right time.
author james
date Mon, 20 Sep 2004 18:11:33 +0000
parents 023b83f4e54b
children 914c5afaac33
comparison
equal deleted inserted replaced
2283:f512fee90bfb 2284:17dfe8e3aead
404 ;; activated timer. 404 ;; activated timer.
405 (if (get-itimer (itimer-name itimer)) 405 (if (get-itimer (itimer-name itimer))
406 (error "itimer named \"%s\" already existing and activated" 406 (error "itimer named \"%s\" already existing and activated"
407 (itimer-name itimer)))) 407 (itimer-name itimer))))
408 (let ((inhibit-quit t)) 408 (let ((inhibit-quit t))
409 (if itimer-timer
410 ;; Modify the itimer timeout value as if it were begun
411 ;; at the last time when the itimer driver was woken up.
412 (set-itimer-value
413 itimer
414 (+ (itimer-value itimer)
415 (itimer-time-difference (current-time)
416 itimer-timer-last-wakeup))))
409 ;; add the itimer to the global list 417 ;; add the itimer to the global list
410 (setq itimer-list (cons itimer itimer-list)) 418 (setq itimer-list (cons itimer itimer-list))
411 ;; If the itimer process is scheduled to wake up too late for 419 ;; If the itimer process is scheduled to wake up too late for
412 ;; the itimer we wake it up to calculate a correct wakeup 420 ;; the itimer we wake it up to calculate a correct wakeup
413 ;; value giving consideration to the newly added itimer. 421 ;; value giving consideration to the newly added itimer.