ee0d61f41802

Clean up `timing` macroexpansion a bit
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 15 Oct 2016 13:14:17 +0000
parents 96818717e72d
children 756273274876
branches/tags (none)
files losh.lisp

Changes

--- a/losh.lisp	Sat Oct 15 13:12:30 2016 +0000
+++ b/losh.lisp	Sat Oct 15 13:14:17 2016 +0000
@@ -760,14 +760,14 @@
 
   "
   (let ((timing-function (ecase time-type
-                           ((real-time) #'get-internal-real-time)
-                           ((run-time) #'get-internal-run-time)))
+                           ((real-time) 'get-internal-real-time)
+                           ((run-time) 'get-internal-run-time)))
         (since-var (or since-var (when (null per-var)
                                    iterate::*result-var*))))
     (with-gensyms (start-time current-time previous-time)
       `(progn
-        (with ,start-time = (funcall ,timing-function))
-        (for ,current-time = (funcall ,timing-function))
+        (with ,start-time = (,timing-function))
+        (for ,current-time = (,timing-function))
         ,@(when since-var
             `((for ,since-var = (- ,current-time ,start-time))))
         ,@(when per-var