unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 12430@debbugs.gnu.org
Subject: bug#12430: Glitches caused by addition of psec to timers
Date: Thu, 13 Sep 2012 16:11:21 -0400	[thread overview]
Message-ID: <so627hhedy.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <505235F3.3080909@cs.ucla.edu> (Paul Eggert's message of "Thu, 13 Sep 2012 12:37:23 -0700")

Paul Eggert wrote:

> I don't see how rounding errors could be avoided.  As a trivial example, if I
> write '0.001' in Emacs Lisp, I get a number slightly bigger than 0.001
> due to rounding error, so the underlying OS primitives (which always
> get the ceiling of the delay request) would see two nanoseconds rather
> than the one that I wanted.  OK, so it's only a nanosecond off, but
> the point is that Emacs shouldn't be munging the low-order
> bits of users' requests.

Maybe you should future-proof the timer format by jumping to units of
Planck time rather than picoseconds... I supposed you still need to
worry about portability between Universes though (please address in
Gnulib ASAP).

(I wonder when the first Emacs application will be written that has a
legitimate need to schedule a timer event with sub-millisecond
resolution.)





  reply	other threads:[~2012-09-13 20:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13  6:04 bug#12430: Glitches caused by addition of psec to timers Paul Eggert
2012-09-13 12:49 ` Stefan Monnier
2012-09-13 16:26   ` Paul Eggert
2012-09-13 16:57   ` Eli Zaretskii
2012-09-13 18:48     ` Paul Eggert
2012-09-13 19:19       ` Eli Zaretskii
2012-09-13 19:37         ` Paul Eggert
2012-09-13 20:11           ` Glenn Morris [this message]
2012-09-14  6:32           ` Eli Zaretskii
2012-09-13 21:35     ` Stefan Monnier
2012-09-14  6:32       ` Eli Zaretskii
2012-09-14 13:18         ` Stefan Monnier
2012-09-14 13:44           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=so627hhedy.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=12430@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).