Function: emacs-uptime
emacs-uptime is an autoloaded, interactive and byte-compiled function
defined in time.el.gz.
Signature
(emacs-uptime &optional FORMAT HERE)
Documentation
Return a string giving the uptime of this instance of Emacs.
FORMAT is a string to format the result, using format-seconds.
For example, the Unix uptime command format is "%D, %z%2h:%.2m".
If the optional argument HERE is non-nil, insert string at
point.
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-uptime (&optional format here)
"Return a string giving the uptime of this instance of Emacs.
FORMAT is a string to format the result, using `format-seconds'.
For example, the Unix uptime command format is \"%D, %z%2h:%.2m\".
If the optional argument HERE is non-nil, insert string at
point."
(interactive "i\nP")
(let ((str
(format-seconds (or format "%Y, %D, %H, %M, %z%S")
(time-convert
(time-since before-init-time)
'integer))))
(if here
(insert str)
(if (called-interactively-p 'interactive)
(message "%s" str)
str))))