Mercurial > emacs
diff lisp/eshell/em-unix.el @ 111456:646142bd4c38
Replace some eshell functions that duplicate standard functions.
* lisp/eshell/esh-util.el (eshell-time-less-p, eshell-time-to-seconds): Remove.
(eshell-read-passwd, eshell-read-hosts): Use time-less-p.
* lisp/eshell/esh-test.el (eshell-test, eshell-show-usage-metrics):
* lisp/eshell/em-unix.el (eshell-show-elapsed-time, eshell/time):
* lisp/eshell/em-pred.el (eshell-pred-file-time): Use float-time.
* lisp/eshell/em-ls.el (eshell-ls-sort-entries): Use time-less-p.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 09 Nov 2010 19:57:32 -0800 |
parents | f21190964294 |
children | 417b1e4d63cd |
line wrap: on
line diff
--- a/lisp/eshell/em-unix.el Tue Nov 09 19:53:03 2010 -0800 +++ b/lisp/eshell/em-unix.el Tue Nov 09 19:57:32 2010 -0800 @@ -912,9 +912,7 @@ (defvar eshell-time-start nil) (defun eshell-show-elapsed-time () - (let ((elapsed (format "%.3f secs\n" - (- (eshell-time-to-seconds (current-time)) - eshell-time-start)))) + (let ((elapsed (format "%.3f secs\n" (- (float-time) eshell-time-start)))) (set-text-properties 0 (length elapsed) '(face bold) elapsed) (eshell-interactive-print elapsed)) (remove-hook 'eshell-post-command-hook 'eshell-show-elapsed-time t)) @@ -940,7 +938,7 @@ :show-usage :usage "COMMAND... Show wall-clock time elapsed during execution of COMMAND.") - (setq eshell-time-start (eshell-time-to-seconds (current-time))) + (setq eshell-time-start (float-time)) (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t) ;; after setting (throw 'eshell-replace-command