Last active
March 30, 2020 00:46
-
-
Save takaxp/ffcfbf6558a272186012b5218bc0c9fc to your computer and use it in GitHub Desktop.
my:init-loading-time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; .emacs/init.el の先頭に記述 | |
| (defconst before-load-init-time (current-time)) | |
| (defun my:init-loading-time () | |
| "Loading time of user init files including time for `after-init-hook'." | |
| (let ((time1 (float-time | |
| (time-subtract after-init-time before-load-init-time))) | |
| (time2 (float-time | |
| (time-subtract (current-time) before-load-init-time)))) | |
| (message (concat "Loading init files: %.0f [msec], " | |
| "of which %.f [msec] for `after-init-hook'.") | |
| (* 1000 time1) (* 1000 (- time2 time1))))) | |
| (add-hook 'after-init-hook 'my:init-loading-time t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment