summaryrefslogtreecommitdiff
path: root/lisp/time.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-07-13 17:53:53 +0000
committerKarl Heuer <kwzh@gnu.org>1996-07-13 17:53:53 +0000
commit7171b90f5cb1db86b3abd3ee446c0d6d3ab490f8 (patch)
tree570dbbb55b77ee4a145eb706e6a40eab6c2c8fb6 /lisp/time.el
parentae31368a32e82c88371b308a722e026ed05af0c1 (diff)
downloademacs-7171b90f5cb1db86b3abd3ee446c0d6d3ab490f8.tar.gz
(display-time): Fix start time for run-at-time.
Diffstat (limited to 'lisp/time.el')
-rw-r--r--lisp/time.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/time.el b/lisp/time.el
index 473135d5700..08c2f86c82c 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -71,7 +71,10 @@ After each update, `display-time-hook' is run with `run-hooks'."
;; 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))
+ ;; Start timer at the beginning of the current minute so that
+ ;; it updates as soon as the minute changes.
+ (run-at-time (apply 'encode-time 0 (cdr (decode-time)))
+ display-time-interval 'display-time-event-handler))
;; When you get new mail, clear "Mail" from the mode line.
(add-hook 'rmail-after-get-new-mail-hook 'display-time-event-handler))