[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is there a emacs lisp timing command?
From: |
thierry . volpiatto |
Subject: |
Re: is there a emacs lisp timing command? |
Date: |
Tue, 24 Mar 2009 09:11:21 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.91 (gnu/linux) |
Have a look also at all the elp-instrument-* functions
Helmut Eller <eller.helmut@gmail.com> writes:
> * Xah Lee [2009-03-24 02:57+0100] writes:
>
>> anyone has written a timing command somewhere?
>
> I've use this for ages:
>
> ;;;; CL-like time macro
> (defmacro time (form)
> (autoload 'elp-elapsed-time "elp")
> (let ((start (make-symbol "#:start")))
> `(let ((,start (current-time)))
> (prog1 ,form
> (princ (format "Elapsed time: %.2f sec \n"
> (elp-elapsed-time ,start (current-time))))))))
>
>
> Helmut.
>
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France