mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-04 19:29:37 +00:00
Merge pull request from phillord/master
Load time display option. GitHub-reference: https://github.com/jwiegley/use-package/issues/15
This commit is contained in:
commit
49d25ce022
1 changed files with 7 additions and 1 deletions
|
@ -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)))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue