From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: uptime.el Date: Tue, 12 Feb 2008 02:14:38 +0200 Organization: JURTA Message-ID: <87tzkf131o.fsf@jurta.org> References: <07tzkgtjom.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202776188 31216 80.91.229.12 (12 Feb 2008 00:29:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Feb 2008 00:29:48 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 12 01:30:11 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JOj2D-0004Xa-Uh for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2008 01:30:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOj1k-0007eU-HS for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2008 19:29:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOj0K-0006dD-0z for emacs-devel@gnu.org; Mon, 11 Feb 2008 19:28:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOj0H-0006ax-VU for emacs-devel@gnu.org; Mon, 11 Feb 2008 19:28:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOj0H-0006ab-3Y for emacs-devel@gnu.org; Mon, 11 Feb 2008 19:28:05 -0500 Original-Received: from anti-4.kiev.sovam.com ([62.64.120.202]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JOj0A-00086R-Dq; Mon, 11 Feb 2008 19:27:58 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by anti-4.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JOj07-000Fr8-Pq; Tue, 12 Feb 2008 02:27:56 +0200 In-Reply-To: <07tzkgtjom.fsf@fencepost.gnu.org> (Glenn Morris's message of "Sun, 10 Feb 2008 19:34:33 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Scanner-Signature: 7b1a4900bea4ee3727a65c989d5962bc X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2223 [Feb 11 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 11 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88809 Archived-At: >> What do people think of this? > > Might as well have this functionality. I installed something similar. Thanks. >> (The patch in startup.el should be done differently.) > > I set emacs-startup-time in command-line. I think there should be two recorded startup timestamps instead of one: the first timestamp recorded as early as possible, and the second - when Emacs completely finishes loading .emacs and all related files. The difference between these two timestamps will show how much time the startup process itself takes. This is useful for optimization of .emacs loading. So a new command emacs-startup-time could display (or non-interactively return) the duration of the Emacs startup. >> (defun emacs-uptime (&optional here) "\ >> Tell how long GNU Emacs has been running. >> If the optional argument HERE is non-nil, insert string at point." > > Didn't see the point of the HERE argument; used an alternative > implementation based on something in gnus-art. A general time difference function would be definitely useful, but what format it should use? For the uptime perhaps the standard format of the `uptime' system command is more preferable, e.g. "15:16:19 up 51 days 1 year". -- Juri Linkov http://www.jurta.org/emacs/