diff options
Diffstat (limited to 'spacemacs.el')
-rw-r--r-- | spacemacs.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spacemacs.el b/spacemacs.el index 8d5c5ee..9db0854 100644 --- a/spacemacs.el +++ b/spacemacs.el @@ -522,6 +522,14 @@ in the dump." ("M-SPC" . (lambda () (interactive) (just-one-space -1))) ("M-[" . (lambda () (interactive) (find-file "~/tmp/scratch.org"))))) +(defmacro 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)))) + (defun dotspacemacs/user-config () "Configuration function for user code. This function is called at the very end of Spacemacs initialization after layers configuration. |