mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(emacs-init-time): New function.
This commit is contained in:
parent
5ab0e67e80
commit
24d6c292ec
2 changed files with 19 additions and 1 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2008-02-16 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* 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 <monnier@iro.umontreal.ca>
|
||||
|
||||
* files.el (locate-dominating-file): Remove initial loop because it's
|
||||
|
|
|
|||
13
lisp/time.el
13
lisp/time.el
|
|
@ -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)))))))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(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)
|
||||
str)))
|
||||
|
||||
;;;###autoload
|
||||
(defun emacs-init-time ()
|
||||
"Return a string giving the duration of the Emacs initialization."
|
||||
(interactive)
|
||||
(let ((str
|
||||
(format-seconds "%z%S"
|
||||
(time-to-seconds
|
||||
(time-subtract after-init-time before-init-time)))))
|
||||
(if (interactive-p)
|
||||
(message "%s" str)
|
||||
str)))
|
||||
|
||||
(provide 'time)
|
||||
|
||||
;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue