diff options
Diffstat (limited to 'lisp/time.el')
-rw-r--r-- | lisp/time.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/time.el b/lisp/time.el index 9084217024a..35157c5e807 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -434,16 +434,17 @@ update which can wait for the next redisplay." ((and (stringp mail-spool-file) (or (null display-time-server-down-time) ;; If have been down for 20 min, try again. - (< 1200 (- (float-time now) - display-time-server-down-time)))) - (let ((start-time (float-time))) + (time-less-p 1200 (time-since + display-time-server-down-time)))) + (let ((start-time (current-time))) (prog1 (display-time-file-nonempty-p mail-spool-file) ;; Record whether mail file is accessible. (setq display-time-server-down-time - (let ((end-time (float-time))) - (and (< 20 (- end-time start-time)) - end-time)))))))) + (let ((end-time (current-time))) + (and (time-less-p 20 (time-subtract + end-time start-time)) + (float-time end-time))))))))) (24-hours (substring time 11 13)) (hour (string-to-number 24-hours)) (12-hours (int-to-string (1+ (% (+ hour 11) 12)))) @@ -571,8 +572,9 @@ For example, the Unix uptime command format is \"%D, %z%2h:%.2m\"." (interactive) (let ((str (format-seconds (or format "%Y, %D, %H, %M, %z%S") - (float-time - (time-subtract nil before-init-time))))) + (encode-time + (time-since before-init-time) + 'integer)))) (if (called-interactively-p 'interactive) (message "%s" str) str))) |