aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-02-16 03:29:43 +0000
committerGlenn Morris2008-02-16 03:29:43 +0000
commit2736785af7b2aca67dcf0e241129f4565531ebc2 (patch)
tree3d9add2902a5579588e049faae3c7fe0f236d546
parent627a335d54ffcbba466e7921421c3e234f146190 (diff)
downloademacs-2736785af7b2aca67dcf0e241129f4565531ebc2.tar.gz
emacs-2736785af7b2aca67dcf0e241129f4565531ebc2.zip
(emacs-uptime): Move here from time-date.el.
-rw-r--r--lisp/time.el14
1 files changed, 14 insertions, 0 deletions
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'."
548 (when (equal (symbol-name (aref elt 5)) "display-time-world-timer") 548 (when (equal (symbol-name (aref elt 5)) "display-time-world-timer")
549 (cancel-timer elt))))))) 549 (cancel-timer elt)))))))
550 550
551
552;;;###autoload
553(defun emacs-uptime ()
554 "Return a string giving the uptime of this instance of Emacs."
555 (interactive)
556 (let ((str
557 (format-seconds "%Y, %D, %H, %M, %S"
558 (time-to-seconds
559 (time-subtract (current-time) emacs-startup-time))
560 t)))
561 (if (interactive-p)
562 (message "%s" str)
563 str)))
564
551(provide 'time) 565(provide 'time)
552 566
553;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6 567;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6