aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-06-30 17:30:18 -0700
committerPaul Eggert2011-06-30 17:30:18 -0700
commit3103f8b658a3d87f7504471631e8a466bc7ce7c5 (patch)
tree53387380bfd1dd3106b0daa3cb2733005b595eab
parente2bac5f625481e45ccd1a217af0cd211df461a20 (diff)
downloademacs-3103f8b658a3d87f7504471631e8a466bc7ce7c5.tar.gz
emacs-3103f8b658a3d87f7504471631e8a466bc7ce7c5.zip
* emacs-lisp/elp.el (elp-elapsed-time): Use float-time.
-rw-r--r--lisp/ChangeLog1
-rw-r--r--lisp/emacs-lisp/elp.el6
2 files changed, 3 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ab071c79454..336531516ec 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,7 @@
3 * calendar/timeclock.el (timeclock-seconds-to-time): 3 * calendar/timeclock.el (timeclock-seconds-to-time):
4 Defalias to seconds-to-time, since they're the same thing. 4 Defalias to seconds-to-time, since they're the same thing.
5 5
6 * emacs-lisp/elp.el (elp-elapsed-time):
6 * emacs-lisp/benchmark.el (benchmark-elapse): 7 * emacs-lisp/benchmark.el (benchmark-elapse):
7 * allout-widgets.el (allout-elapsed-time-seconds): Use float-time. 8 * allout-widgets.el (allout-elapsed-time-seconds): Use float-time.
8 9
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index 73af3a5708f..b89b6decfc9 100644
--- a/lisp/emacs-lisp/elp.el
+++ b/lisp/emacs-lisp/elp.el
@@ -282,7 +282,7 @@ FUNSYM must be a symbol of a defined function."
282 ;; the function so that non-local exists are still recorded. TBD: 282 ;; the function so that non-local exists are still recorded. TBD:
283 ;; I haven't tested non-local exits at all, so no guarantees. 283 ;; I haven't tested non-local exits at all, so no guarantees.
284 ;; 284 ;;
285 ;; The 1st element is the total amount of time in usecs that have 285 ;; The 1st element is the total amount of time in seconds that has
286 ;; been spent inside this function. This number is added to on 286 ;; been spent inside this function. This number is added to on
287 ;; function exit. 287 ;; function exit.
288 ;; 288 ;;
@@ -424,9 +424,7 @@ Use optional LIST if provided instead."
424 424
425 425
426(defsubst elp-elapsed-time (start end) 426(defsubst elp-elapsed-time (start end)
427 (+ (* (- (car end) (car start)) 65536.0) 427 (float-time (time-subtract end start)))
428 (- (car (cdr end)) (car (cdr start)))
429 (/ (- (car (cdr (cdr end))) (car (cdr (cdr start)))) 1000000.0)))
430 428
431(defun elp-wrapper (funsym interactive-p args) 429(defun elp-wrapper (funsym interactive-p args)
432 "This function has been instrumented for profiling by the ELP. 430 "This function has been instrumented for profiling by the ELP.