Below are some timing LISP routines which may be helpful. They are provided by Mauricio Herandez, a former student..... ;; ;; Stop-clock routines. ;; ;; Written by Mauricio A. Hernandez for W4701, October 1995. ;; Department of Computer Science, Columbia University. ;; The author can be reached at mauricio@cs.columbia.edu ;; ;; How to use: ;; ;; > (start-timer 'my-clock) ;; ;; The current time, in internal form, is returned ;; > ;; Do your functions here. ;; > ;; ;; > (stop-timer 'my-clock) ;; ;; The current time, in internal form, is returned ;; > (clock-time 'my-clock) ;; 20.34524 ;; ;; Your function took 20.3 seconds to complete. ;; Notice that you can have several clocks "running" in your program. ;; at the same time. Just give a different name to each one. Also, ;; STOP-TIMER does not actually stops the clock but rather records the ;; current time for the use of the next CLOCK-TIME call. In other words, ;; you can "stop" the clock as many times you want to check the time ;; at different intervals of your program. For example: ;; ;; > (start-timer 'stop-clock) ;; ;; as before, the real time is returned ;; > ;; Let me wait 20 secs. ;; > (stop-timer 'stop-clock) ;; ;; as before, the real time is returned ;; > (clock-time 'stop-clock) ;; 20.48349 ;; > ;; Now I wait another 20 secs and stop the timer again. ;; > (stop-timer 'stop-clock) ;; ;; another number appears ;; > (clock-time 'stop-clock) ;; 40.34533 ;; ;; You can also use STOP-AND-RETURN-TIMER to stop and return the ;; interval time. This function is equivalent to a call to STOP-TIMER ;; followed by CLOCK-TIME. ;; (in-package 'user) (defun start-timer (timer) (progn ;; Get the Real System time. (setf (get timer 'start-time) (get-internal-real-time)) ;; Reset the stop-time. (setf (get timer 'stop-time) (get timer 'start-time)))) (defun stop-timer (timer) ;; Set the stop time to the system real time. (setf (get timer 'stop-time) (get-internal-real-time))) (defun stop-and-return-timer (timer) (progn ;; Set the stop time to the system real time. (setf (get timer 'stop-time) (get-internal-real-time)) (clock-time timer))) (defun clock-time (timer) ;; Return the difference between the stop-time and start-time. (/ (- (get timer 'stop-time) (get timer 'start-time)) 1000000.0))