From: Glenn Morris Date: Sat, 16 Feb 2008 03:29:43 +0000 (+0000) Subject: (emacs-uptime): Move here from time-date.el. X-Git-Tag: emacs-pretest-23.0.90~7931 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2736785af7b2aca67dcf0e241129f4565531ebc2;p=emacs.git (emacs-uptime): Move here from time-date.el. --- diff --git a/lisp/time.el b/lisp/time.el index f451529cb0d..c9ca2059b7b 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -548,6 +548,20 @@ 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 () + "Return a string giving the uptime of this instance of Emacs." + (interactive) + (let ((str + (format-seconds "%Y, %D, %H, %M, %S" + (time-to-seconds + (time-subtract (current-time) emacs-startup-time)) + t))) + (if (interactive-p) + (message "%s" str) + str))) + (provide 'time) ;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6