Commit 24d6c292 authored by Juri Linkov's avatar Juri Linkov
Browse files

(emacs-init-time): New function.

parent 5ab0e67e
2008-02-16 Juri Linkov <>
* startup.el (after-init-time): New variable.
(command-line): Set `after-init-time' to the current time.
* time.el (emacs-init-time): New function.
2008-02-16 Stefan Monnier <>
* files.el (locate-dominating-file): Remove initial loop because it's
......@@ -548,7 +548,6 @@ To turn off the world time display, go to that window and type `q'."
(when (equal (symbol-name (aref elt 5)) "display-time-world-timer")
(cancel-timer elt)))))))
(defun emacs-uptime (&optional format)
"Return a string giving the uptime of this instance of Emacs.
......@@ -563,6 +562,18 @@ For example, the Unix uptime command format is \"%D, %z%2h:%.2m\"."
(message "%s" str)
(defun emacs-init-time ()
"Return a string giving the duration of the Emacs initialization."
(let ((str
(format-seconds "%z%S"
(time-subtract after-init-time before-init-time)))))
(if (interactive-p)
(message "%s" str)
(provide 'time)
;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment