# HG changeset patch # User Richard M. Stallman # Date 825443085 0 # Node ID 87d459e75dadf257a02411f90edfa750705ca95b # Parent 5a7714d4748e95d6ef2ff16cedb77d89bf0dab47 (display-time): Use run-at-time to start the timer. diff -r 5a7714d4748e -r 87d459e75dad lisp/time.el --- a/lisp/time.el Tue Feb 27 16:51:25 1996 +0000 +++ b/lisp/time.el Tue Feb 27 17:44:45 1996 +0000 @@ -63,18 +63,15 @@ are displayed as well. After each update, `display-time-hook' is run with `run-hooks'." (interactive) - (require 'timer) - (if (timerp display-time-timer) - (cancel-timer display-time-timer) - (setq display-time-timer (timer-create))) (setq display-time-string "") (or global-mode-string (setq global-mode-string '(""))) (or (memq 'display-time-string global-mode-string) (setq global-mode-string (append global-mode-string '(display-time-string)))) - (timer-set-time display-time-timer (current-time) display-time-interval) - (timer-set-function display-time-timer 'display-time-event-handler) - (timer-activate display-time-timer) + ;; Setup the time timer. + (and display-time-timer (cancel-timer display-time-timer)) + (setq display-time-timer + (run-at-time nil display-time-interval 'display-time-event-handler)) ;; When you get new mail, clear "Mail" from the mode line. (add-hook 'rmail-get-new-mail-hook 'display-time-event-handler))