diff options
author | Glenn Morris <rgm@gnu.org> | 2010-11-09 19:57:32 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2010-11-09 19:57:32 -0800 |
commit | 73171bd4cc3333a43ef8810ba4f7d0a864f20fa8 (patch) | |
tree | a00e6939b432aa45fc7b18096a4f8baf7e77ab93 /lisp/eshell/em-unix.el | |
parent | 13e7256f9425c09c827827302fda440f95fe5c43 (diff) | |
download | emacs-73171bd4cc3333a43ef8810ba4f7d0a864f20fa8.tar.gz |
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.
Diffstat (limited to 'lisp/eshell/em-unix.el')
-rw-r--r-- | lisp/eshell/em-unix.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 36a89e33fb6..d4f62415084 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -912,9 +912,7 @@ Summarize disk usage of each FILE, recursively for directories.") (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 @@ Summarize disk usage of each FILE, recursively for directories.") :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 |