r9687: new routines
[kmrcl.git] / macros.lisp
index 1239eb46b6d7d7cce32b073edc15d0d53a23efe8..c83b3b64a19f9f9be26f9dd96daa9ed9213f6f6d 100644 (file)
      ,@body))
 
 
+(defmacro time-seconds (&body body)
+  (let ((t1 (gensym)))
+    `(let ((,t1 (get-internal-real-time)))
+       (values
+       (progn ,@body)
+       (coerce (/ (- (get-internal-real-time) ,t1)
+                  internal-time-units-per-second)
+               'double-float)))))
+  
 (defmacro time-iterations (n &body body)
   (let ((i (gensym))
        (count (gensym)))