From: Phillip Lord Date: Tue, 5 Feb 2013 21:46:02 +0000 (+0000) Subject: Added minimum load time display option X-Git-Tag: emacs-29.0.90~1306^2~15^2~462^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aa8d5fab19254adee83dde0f94e0216558e091dc;p=emacs.git Added minimum load time display option Makes the minimum load time before use-package displays a message a customizable option. --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index ea051ef91e7..b2ab8190630 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -276,6 +276,12 @@ :type 'boolean :group 'use-package) +(defcustom use-package-minimum-reported-time 0.01 + "Minimal load time that will be reported" + :type 'number + :group 'use-package + ) + (defmacro with-elapsed-timer (text &rest forms) `(let ((now ,(if use-package-verbose '(current-time)))) @@ -286,7 +292,7 @@ ,(when use-package-verbose `(let ((elapsed (float-time (time-subtract (current-time) now)))) - (if (> elapsed 0.01) + (if (> elapsed use-package-minimum-reported-time) (message "%s...done (%.3fs)" ,text elapsed) (message "%s...done" ,text)))))))