summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/benchmark.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/benchmark.el')
-rw-r--r--lisp/emacs-lisp/benchmark.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el
index 445e78b427c..02db21a7e53 100644
--- a/lisp/emacs-lisp/benchmark.el
+++ b/lisp/emacs-lisp/benchmark.el
@@ -34,13 +34,11 @@
(defmacro benchmark-elapse (&rest forms)
"Return the time in seconds elapsed for execution of FORMS."
(declare (indent 0) (debug t))
- (let ((t1 (make-symbol "t1"))
- (t2 (make-symbol "t2")))
- `(let (,t1 ,t2)
+ (let ((t1 (make-symbol "t1")))
+ `(let (,t1)
(setq ,t1 (current-time))
,@forms
- (setq ,t2 (current-time))
- (float-time (time-subtract ,t2 ,t1)))))
+ (float-time (time-subtract nil ,t1)))))
;;;###autoload
(defmacro benchmark-run (&optional repetitions &rest forms)