From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: uptime.el Date: Tue, 12 Feb 2008 00:50:06 -0500 Message-ID: References: <07tzkgtjom.fsf@fencepost.gnu.org> <87tzkf131o.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202795428 9075 80.91.229.12 (12 Feb 2008 05:50:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Feb 2008 05:50:28 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 12 06:50:48 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 1JOo2X-00046M-LK for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2008 06:50:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOo24-00036Q-8t for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2008 00:50:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOo1x-000344-Vg for emacs-devel@gnu.org; Tue, 12 Feb 2008 00:50:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOo1v-00030d-SR for emacs-devel@gnu.org; Tue, 12 Feb 2008 00:50:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOo1v-00030R-Lt for emacs-devel@gnu.org; Tue, 12 Feb 2008 00:50:07 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JOo1v-0001L8-Og for emacs-devel@gnu.org; Tue, 12 Feb 2008 00:50:07 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1JOo1u-0001M0-My; Tue, 12 Feb 2008 00:50:06 -0500 X-Spook: Noriega fissionable BLU-97 A/B FBI plutonium Medco AIEWS X-Ran: Q{A7WmU;G/L[6&zP74gEIUn~3Qqm$3oJ0^)88Q_>`Q|Y3~O+)Xmb^.f1;x"9?7bO,{w~tu X-Hue: white X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:88836 Archived-At: Juri Linkov wrote: > 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". Personally I think the `uptime' format ("up 3 days, 6:41") is ugly. I mean something where you can specify a format-string. I have in mind something like: (defun format-seconds (format-string seconds) "Use FORMAT-STRING to format the number SECONDS. The valid format specifiers are: %y is the number of (365-day) years. %d is the number of days. %h is the number of hours. %m is the number of minutes. %s is the number of seconds. Upper-case specifiers are followed by the unit-name (e.g. \"years\"). Lower-case specifiers return only the unit." together with the ability to say eg "%.3y" for 001 years.