Yesterday I declared emacs bankruptcy and now I'm writing my init.el file from scratch.
I'd like to call a function several times within my init.el file to output the current loading times. I've found this piece of code which only tells the final loading time:
(when window-system (let ((elapsed (float-time (time-subtract (current-time) emacs-start-time)))) (message "Loading %s...done (%.3fs)" load-file-name elapsed)) (add-hook 'after-init-hook `(lambda () (let ((elapsed (float-time (time-subtract (current-time) emacs-start-time)))) (message "Loading %s...done (%.3fs) [after-init]" ,load-file-name elapsed))) t))
So far I failed any attempt to 'extract' some bits and bobs from there to create the function I look for.
Although I've using Emacs for several years, I have no idea about elisp. All I do is copy + paste + edit code, which is a shame.
Please don't accuse me of not even try it because I had spent a good couple of hours with zero results. I'd put some of the code I've written but I don't think it would help to anything apart from embarrass myself.
I know that there are several packages which help profiling Emacs configuration files but that's not really what I'm kindly asking here. I'd like some help to write a little function.