Function: emacs-init-time

emacs-init-time is an autoloaded, interactive and byte-compiled function defined in time.el.gz.

Signature

(emacs-init-time &optional FORMAT)

Documentation

Return a string giving the duration of the Emacs initialization.

FORMAT is a string to format the result, using format. If nil, the default format "%f seconds" is used.

View in manual

Probably introduced at or before Emacs version 23.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/time.el.gz
;;;###autoload
(defun emacs-init-time (&optional format)
  "Return a string giving the duration of the Emacs initialization.
FORMAT is a string to format the result, using `format'.  If nil,
the default format \"%f seconds\" is used."
  (interactive)
  (let ((str (format (or format "%f seconds")
                     (float-time (time-subtract after-init-time
                                                before-init-time)))))
    (if (called-interactively-p 'interactive)
        (message "%s" str)
      str)))