aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-06-30 21:52:27 -0700
committerPaul Eggert2011-06-30 21:52:27 -0700
commitb9444d97feca73cb2a90559241bc79584692da54 (patch)
tree92954e372011ba0bbfecdd0edc02eeb5d89191aa
parent0ef923dcc3ed7f7f7824dce22f372e34ee26b687 (diff)
downloademacs-b9444d97feca73cb2a90559241bc79584692da54.tar.gz
emacs-b9444d97feca73cb2a90559241bc79584692da54.zip
* woman.el (woman-decode-buffer, WoMan-log-end): Log fractional secs
by using time-since and float-time.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/woman.el12
2 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4bd6cd45671..87de0957574 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12011-07-01 Paul Eggert <eggert@cs.ucla.edu> 12011-07-01 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * woman.el (woman-decode-buffer, WoMan-log-end): Log fractional secs
4 by using time-since and float-time.
5
3 * vc/ediff-util.el (ediff-calc-command-time): Use time-since 6 * vc/ediff-util.el (ediff-calc-command-time): Use time-since
4 and float-time. Say "NNN.NNN seconds" rather than "NNN seconds 7 and float-time. Say "NNN.NNN seconds" rather than "NNN seconds
5 + NNN microseconds". 8 + NNN microseconds".
diff --git a/lisp/woman.el b/lisp/woman.el
index eb801b55d4d..c6bd4a4c8d1 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -2157,8 +2157,8 @@ No external programs are used."
2157 (run-hooks 'woman-pre-format-hook) 2157 (run-hooks 'woman-pre-format-hook)
2158 (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1)) 2158 (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1))
2159 ;; (fundamental-mode) 2159 ;; (fundamental-mode)
2160 (let ((start-time (current-time)) ; (HIGH LOW MICROSEC) 2160 (let ((start-time (current-time))
2161 time) ; HIGH * 2**16 + LOW seconds 2161 time)
2162 (message "WoMan formatting buffer...") 2162 (message "WoMan formatting buffer...")
2163; (goto-char (point-min)) 2163; (goto-char (point-min))
2164; (cond 2164; (cond
@@ -2167,10 +2167,8 @@ No external programs are used."
2167; (delete-region (point-min) (point))) ; potentially dangerous! 2167; (delete-region (point-min) (point))) ; potentially dangerous!
2168; (t (message "WARNING: .TH request not found -- not man-page format?"))) 2168; (t (message "WARNING: .TH request not found -- not man-page format?")))
2169 (woman-decode-region (point-min) (point-max)) 2169 (woman-decode-region (point-min) (point-max))
2170 (setq time (current-time) 2170 (setq time (float-time (time-since start-time)))
2171 time (+ (* (- (car time) (car start-time)) 65536) 2171 (message "WoMan formatting buffer...done in %g seconds" time)
2172 (- (cadr time) (cadr start-time))))
2173 (message "WoMan formatting buffer...done in %d seconds" time)
2174 (WoMan-log-end time)) 2172 (WoMan-log-end time))
2175 (run-hooks 'woman-post-format-hook)) 2173 (run-hooks 'woman-post-format-hook))
2176 2174
@@ -4529,7 +4527,7 @@ IGNORED is a string appended to the log message."
4529 "Log the end of formatting in *WoMan-Log*. 4527 "Log the end of formatting in *WoMan-Log*.
4530TIME specifies the time it took to format the man page, to be printed 4528TIME specifies the time it took to format the man page, to be printed
4531with the message." 4529with the message."
4532 (WoMan-log-1 (format "Formatting time %d seconds." time) 'end)) 4530 (WoMan-log-1 (format "Formatting time %g seconds." time) 'end))
4533 4531
4534(defun WoMan-log-1 (string &optional end) 4532(defun WoMan-log-1 (string &optional end)
4535 "Log a message STRING in *WoMan-Log*. 4533 "Log a message STRING in *WoMan-Log*.