;;; 7/18/2001 Alexander Repenning ;;; 12/12/08 Clozure CL ;;; Nano Second Timer ;;; works for intel macs ;;; Hemlock Editor Extension: Ctrl-x Ctrl-t will show the time is takes to compute the ;;; current form selected in an editor buffer. Time is in nano seconds ;;; unlike a previous version of this code called hires timer, code will be executed ;;; only once. (in-package :hemlock) (export '(time-to-run)) (defvar *mach-time-unit-ratio* (ccl::rlet ((info #>mach_timebase_info)) (#_mach_timebase_info info) (/ (ccl::pref info #>mach_timebase_info.numer) (ccl::pref info #>mach_timebase_info.denom)))) (eval-when (:compile-toplevel :load-toplevel :execute) (defmacro TIME-TO-RUN (&body Form) " in: &body Form {t}. Measure the time is takes to run