diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-30 21:44:40 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-30 21:44:40 -0700 |
commit | 0ef923dcc3ed7f7f7824dce22f372e34ee26b687 (patch) | |
tree | d6ad15d2ef8f066df8394c0b5da15fe5b9f887bc /lisp/vc/ediff-util.el | |
parent | 2f81380d8da399d5c2af874f553570702b91b448 (diff) | |
download | emacs-0ef923dcc3ed7f7f7824dce22f372e34ee26b687.tar.gz |
* vc/ediff-util.el (ediff-calc-command-time): Use time-since
and float-time. Say "NNN.NNN seconds" rather than "NNN seconds
+ NNN microseconds".
Diffstat (limited to 'lisp/vc/ediff-util.el')
-rw-r--r-- | lisp/vc/ediff-util.el | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 40ffea624fb..df6a7e938af 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -4144,15 +4144,9 @@ Mail anyway? (y or n) ") ;; 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))) |