From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Minibuffer tray to display current time and date Date: Sun, 26 Apr 2015 17:52:36 +0200 Message-ID: <20150426155236.GA16838@tuxteam.de> References: <874mo6bgzx.fsf@debian.uxu> <20150424141319.GA19093@tuxteam.de> <831tj9zizy.fsf@gnu.org> <87ioclo9p5.fsf@yale.edu> <83wq11xyiu.fsf@gnu.org> <87h9s3havb.fsf@yale.edu> <83bnibx7wy.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed X-Trace: ger.gmane.org 1430064475 1268 80.91.229.3 (26 Apr 2015 16:07:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Apr 2015 16:07:55 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 26 18:07:51 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YmP5v-0007jM-87 for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 18:07:47 +0200 Original-Received: from localhost ([::1]:51337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmP5u-0001aH-LQ for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 12:07:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmP5f-0000wg-9T for help-gnu-emacs@gnu.org; Sun, 26 Apr 2015 12:07:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmOrR-0004qZ-Nc for help-gnu-emacs@gnu.org; Sun, 26 Apr 2015 11:52:50 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:47521 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmOrL-0004iS-2v; Sun, 26 Apr 2015 11:52:43 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1YmOrE-0004XJ-Nz; Sun, 26 Apr 2015 17:52:36 +0200 In-Reply-To: <83bnibx7wy.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104006 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Apr 26, 2015 at 05:48:13PM +0300, Eli Zaretskii wrote: > It's not a problem with system load, it's a problem with _when_ within > the minute does the timer run. Scheduling it to run every 60 sec > doesn't guarantee that it will run exactly when the minutes advance. > So, if you are unlucky, your time shown in the echo area can be 59 sec > late. I'd expected that a first argument of t for run-at-time would take care of that. From the Elisp doc: "-- Command: run-at-time time repeat function &rest args [...] In most cases, REPEAT has no effect on when _first_ call takes place--TIME alone specifies that. There is one exception: if TIME is `t', then the timer runs whenever the time is a multiple of REPEAT seconds after the epoch. This is useful for functions like `display-time'." So if run-at-time does resync, calling (run-at-time t 60) should do the job all by itself? For anxious people, just displaying the current time rounded to the next full minute should be the equivalent of belt-and-suspenders? I mean, some moral equivalent of: (format-time-string "%H:%M" (seconds-to-time (* 60 (round (/ (float-time) 60))))) Regards - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlU9CcQACgkQBcgs9XrR2kb0JgCfVTqCTWJmbZe7zj2VAwq8a5Op hlkAn0NKfGyhYel+5/93fSeU0KWvnOau =jVAB -----END PGP SIGNATURE-----