Add mesaure time macro
This commit is contained in:
parent
311e20dfeb
commit
0f77a5e45b
@ -633,6 +633,16 @@ the ~:around~ keyword of advice-add.
|
|||||||
|
|
||||||
(imalison:named-builder imalison:compose-around-builder)
|
(imalison:named-builder imalison:compose-around-builder)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
*** Measure Time
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defmacro imalison:measure-time (&rest body)
|
||||||
|
"Measure and return the running time of the code block."
|
||||||
|
(declare (indent defun))
|
||||||
|
(let ((start (make-symbol "start")))
|
||||||
|
`(let ((,start (float-time)))
|
||||||
|
,@body
|
||||||
|
(- (float-time) ,start))))
|
||||||
|
#+END_SRC
|
||||||
** Flatten ~imenu~ Indexes
|
** Flatten ~imenu~ Indexes
|
||||||
I like my imenu indexes flat so I don't have to press enter multiple
|
I like my imenu indexes flat so I don't have to press enter multiple
|
||||||
times to find what I'm looking for. The functions that follow allow me
|
times to find what I'm looking for. The functions that follow allow me
|
||||||
|
Loading…
Reference in New Issue
Block a user