2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
+ * vc/ediff-util.el (ediff-calc-command-time): Use time-since
+ and float-time. Say "NNN.NNN seconds" rather than "NNN seconds
+ + NNN microseconds".
+
* type-break.el (type-break-time-sum): Rewrite using time-add.
* play/hanoi.el (hanoi-current-time-float): Remove.
;; calculate time used by command
(defun ediff-calc-command-time ()
- (let ((end (current-time))
- micro sec)
- (setq micro
- (if (>= (nth 2 end) (nth 2 ediff-command-begin-time))
- (- (nth 2 end) (nth 2 ediff-command-begin-time))
- (+ (nth 2 end) (- 1000000 (nth 2 ediff-command-begin-time)))))
- (setq sec (- (nth 1 end) (nth 1 ediff-command-begin-time)))
- (or (equal ediff-command-begin-time '(0 0 0))
- (message "Elapsed time: %d second(s) + %d microsecond(s)" sec micro))))
+ (or (equal ediff-command-begin-time '(0 0 0))
+ (message "Elapsed time: %g second(s)"
+ (float-time (time-since ediff-command-begin-time)))))
(defsubst ediff-save-time ()
(setq ediff-command-begin-time (current-time)))