; ; Usage: (measure-time (your-long-function) ; Returns: Number of seconds to run your function. ; ; Return value of your-long-function is returned as second value. This value ; will be printed on the console but can only be accessed with the LISP ; function multiple-value-bind. ; (defun get-time () (/ (get-internal-run-time) internal-time-units-per-second)) (defmacro measure-time (x) `(let ((start-point (get-time)) (result ,x)) (values (- (get-time) start-point) result)))