all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH 1/7] gnulib substrate for ns-resolution time stamps
Date: Fri, 01 Jul 2011 20:39:05 +0300	[thread overview]
Message-ID: <83sjqprjd2.fsf@gnu.org> (raw)
In-Reply-To: <4E0DF555.3010005@cs.ucla.edu>

> Date: Fri, 01 Jul 2011 09:27:01 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: emacs-devel@gnu.org
> 
> > Could you perhaps tell more about the changes, and what they
> > should provide on Windows that we don't already have?
> 
> They let Emacs set file ns-resolution file stamps as well.
> And get the time of day to ns resolution.  And set delays
> to ns resolution.

Yes, I understand the motivation.  But given that the Windows system
clock is millisecond resolution anyway, we cannot really take
advantage of that, can we?  So all that needs to be done on Windows is
scale the times in nanosecond units, i.e. multiply the current values
by 1000.  The rest of the complexity is not really useful, right?

> The Windows emulation for <time.h> will need to define struct
> timespec, if it doesn't already.

Which functions require that, and why?

> The Windows port should set high-resolution file time stamps.

For which primitives?  Note that copy-file already uses a
Windows-specific API which takes care of copying the file time stamp
correctly.

> Does Windows support a BSD-style nanotime () or POSIX-style
> clock_gettime (CLOCK_REALTIME, x)?

No.  We can write their emulations, but again: given the 1 to 10
millisecond resolution of the Windows system clock, why is that a good
idea?  Just taking the result of gettimeofday and multiplying the
microseconds by 1000 will give us the same result for much less
effort.

> Does Windows support a POSIX-style pselect ()?

No.  Again, since the time resolution is milliseconds, there's no real
difference between pselect and select, apart of the signature.  We
will not be able to wait less than 1 millisecond.

> Alternatively, you can simply compile lib/pselect.c, which will use
> the Windows select() emulator

I don't think this will work.  Emacs uses its own emulation of
`select'; replacing it with gnulib's will not work out of the box.



  reply	other threads:[~2011-07-01 17:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01  6:59 nanosecond-resolution time stamps Paul Eggert
2011-07-01  8:14 ` [PATCH 1/7] gnulib substrate for ns-resolution " Paul Eggert
2011-07-01 11:20   ` Eli Zaretskii
2011-07-01 14:13     ` Eli Zaretskii
2011-07-01 16:27     ` Paul Eggert
2011-07-01 17:39       ` Eli Zaretskii [this message]
2011-07-01 18:50       ` Paul Eggert
2011-07-01 19:52         ` Eli Zaretskii
2011-07-01  8:14 ` [PATCH 2/7] etc/NEWS patch " Paul Eggert
2011-07-01  8:15 ` [PATCH 3/7] Doc patches " Paul Eggert
2011-07-01  8:15 ` [PATCH 4/7] configure-time support " Paul Eggert
2011-07-01  8:15 ` [PATCH 5/7] C-level " Paul Eggert
2011-07-01  8:16 ` [PATCH 6/7] lib-src " Paul Eggert
2011-07-01  8:16 ` [PATCH 7/7] Lisp-level " Paul Eggert
2011-07-01 15:55 ` nanosecond-resolution " Stefan Monnier
2011-07-01 17:15   ` Paul Eggert
2011-07-04 15:04     ` Stefan Monnier
2011-07-05  7:13       ` Paul Eggert

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

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

  git send-email \
    --in-reply-to=83sjqprjd2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.