diff options
| author | Paul Eggert | 2011-06-30 21:44:40 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-30 21:44:40 -0700 |
| commit | 0ef923dcc3ed7f7f7824dce22f372e34ee26b687 (patch) | |
| tree | d6ad15d2ef8f066df8394c0b5da15fe5b9f887bc | |
| parent | 2f81380d8da399d5c2af874f553570702b91b448 (diff) | |
| download | emacs-0ef923dcc3ed7f7f7824dce22f372e34ee26b687.tar.gz emacs-0ef923dcc3ed7f7f7824dce22f372e34ee26b687.zip | |
* vc/ediff-util.el (ediff-calc-command-time): Use time-since
and float-time. Say "NNN.NNN seconds" rather than "NNN seconds
+ NNN microseconds".
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/vc/ediff-util.el | 12 |
2 files changed, 7 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b067b043ed..4bd6cd45671 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2011-07-01 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-07-01 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * vc/ediff-util.el (ediff-calc-command-time): Use time-since | ||
| 4 | and float-time. Say "NNN.NNN seconds" rather than "NNN seconds | ||
| 5 | + NNN microseconds". | ||
| 6 | |||
| 3 | * type-break.el (type-break-time-sum): Rewrite using time-add. | 7 | * type-break.el (type-break-time-sum): Rewrite using time-add. |
| 4 | 8 | ||
| 5 | * play/hanoi.el (hanoi-current-time-float): Remove. | 9 | * play/hanoi.el (hanoi-current-time-float): Remove. |
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) ") | |||
| 4144 | 4144 | ||
| 4145 | ;; calculate time used by command | 4145 | ;; calculate time used by command |
| 4146 | (defun ediff-calc-command-time () | 4146 | (defun ediff-calc-command-time () |
| 4147 | (let ((end (current-time)) | 4147 | (or (equal ediff-command-begin-time '(0 0 0)) |
| 4148 | micro sec) | 4148 | (message "Elapsed time: %g second(s)" |
| 4149 | (setq micro | 4149 | (float-time (time-since ediff-command-begin-time))))) |
| 4150 | (if (>= (nth 2 end) (nth 2 ediff-command-begin-time)) | ||
| 4151 | (- (nth 2 end) (nth 2 ediff-command-begin-time)) | ||
| 4152 | (+ (nth 2 end) (- 1000000 (nth 2 ediff-command-begin-time))))) | ||
| 4153 | (setq sec (- (nth 1 end) (nth 1 ediff-command-begin-time))) | ||
| 4154 | (or (equal ediff-command-begin-time '(0 0 0)) | ||
| 4155 | (message "Elapsed time: %d second(s) + %d microsecond(s)" sec micro)))) | ||
| 4156 | 4150 | ||
| 4157 | (defsubst ediff-save-time () | 4151 | (defsubst ediff-save-time () |
| 4158 | (setq ediff-command-begin-time (current-time))) | 4152 | (setq ediff-command-begin-time (current-time))) |