summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-30 21:52:27 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-30 21:52:27 -0700
commitb9444d97feca73cb2a90559241bc79584692da54 (patch)
tree92954e372011ba0bbfecdd0edc02eeb5d89191aa /lisp
parent0ef923dcc3ed7f7f7824dce22f372e34ee26b687 (diff)
downloademacs-b9444d97feca73cb2a90559241bc79584692da54.tar.gz
emacs-b9444d97feca73cb2a90559241bc79584692da54.tar.bz2
emacs-b9444d97feca73cb2a90559241bc79584692da54.zip
* woman.el (woman-decode-buffer, WoMan-log-end): Log fractional secs
by using time-since and float-time.
Diffstat (limited to 'lisp')
-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 @@
2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
+ * woman.el (woman-decode-buffer, WoMan-log-end): Log fractional secs
+ by using time-since and float-time.
+
* vc/ediff-util.el (ediff-calc-command-time): Use time-since
and float-time. Say "NNN.NNN seconds" rather than "NNN seconds
+ 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."
(run-hooks 'woman-pre-format-hook)
(and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1))
;; (fundamental-mode)
- (let ((start-time (current-time)) ; (HIGH LOW MICROSEC)
- time) ; HIGH * 2**16 + LOW seconds
+ (let ((start-time (current-time))
+ time)
(message "WoMan formatting buffer...")
; (goto-char (point-min))
; (cond
@@ -2167,10 +2167,8 @@ No external programs are used."
; (delete-region (point-min) (point))) ; potentially dangerous!
; (t (message "WARNING: .TH request not found -- not man-page format?")))
(woman-decode-region (point-min) (point-max))
- (setq time (current-time)
- time (+ (* (- (car time) (car start-time)) 65536)
- (- (cadr time) (cadr start-time))))
- (message "WoMan formatting buffer...done in %d seconds" time)
+ (setq time (float-time (time-since start-time)))
+ (message "WoMan formatting buffer...done in %g seconds" time)
(WoMan-log-end time))
(run-hooks 'woman-post-format-hook))
@@ -4529,7 +4527,7 @@ IGNORED is a string appended to the log message."
"Log the end of formatting in *WoMan-Log*.
TIME specifies the time it took to format the man page, to be printed
with the message."
- (WoMan-log-1 (format "Formatting time %d seconds." time) 'end))
+ (WoMan-log-1 (format "Formatting time %g seconds." time) 'end))
(defun WoMan-log-1 (string &optional end)
"Log a message STRING in *WoMan-Log*.