emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/time.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/time.el,v
Date: Sat, 16 Feb 2008 03:30:58 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/02/16 03:30:57

Index: time.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/time.el,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -b -r1.102 -r1.103
--- time.el     16 Feb 2008 03:29:43 -0000      1.102
+++ time.el     16 Feb 2008 03:30:57 -0000      1.103
@@ -550,14 +550,15 @@
 
 
 ;;;###autoload
-(defun emacs-uptime ()
-  "Return a string giving the uptime of this instance of Emacs."
+(defun emacs-uptime (&optional format)
+  "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\"."
   (interactive)
   (let ((str
-         (format-seconds "%Y, %D, %H, %M, %S"
+         (format-seconds (or format "%Y, %D, %H, %M, %z%S")
                          (time-to-seconds
-                          (time-subtract (current-time) emacs-startup-time))
-                         t)))
+                          (time-subtract (current-time) emacs-startup-time)))))
     (if (interactive-p)
         (message "%s" str)
       str)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]