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: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/lisp/time.el,v
Date: Sat, 16 Feb 2008 23:18:01 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     08/02/16 23:18:00

Index: time.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/time.el,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- time.el     16 Feb 2008 22:21:06 -0000      1.104
+++ time.el     16 Feb 2008 23:18:00 -0000      1.105
@@ -548,7 +548,6 @@
           (when (equal (symbol-name (aref elt 5)) "display-time-world-timer")
             (cancel-timer elt)))))))
 
-
 ;;;###autoload
 (defun emacs-uptime (&optional format)
   "Return a string giving the uptime of this instance of Emacs.
@@ -563,6 +562,18 @@
         (message "%s" str)
       str)))
 
+;;;###autoload
+(defun emacs-init-time ()
+  "Return a string giving the duration of the Emacs initialization."
+  (interactive)
+  (let ((str
+         (format-seconds "%z%S"
+                        (time-to-seconds
+                         (time-subtract after-init-time before-init-time)))))
+    (if (interactive-p)
+        (message "%s" str)
+      str)))
+
 (provide 'time)
 
 ;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6




reply via email to

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