all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#9000: patch for higher-resolution time stamps
@ 2011-07-05  6:40 Paul Eggert
  2011-07-05  6:57 ` bug#9000: More-compatible proposal, using (HIGH LOW USEC PSEC) " Paul Eggert
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Paul Eggert @ 2011-07-05  6:40 UTC (permalink / raw)
  To: 9000

Currently, Emacs supports time stamps to at most microsecond
resolution, and often to only 1-second resolution, even though most
modern systems have nanosecond-resolution time stamps for clock and
file time stamps.  This leads to some problems, for example:

 * "C-u M-x copy-file RET A RET B" discards the fractional part of A's
   time stamp when copying A to B (except for Windows, which I've been
   told uses special code to preserve the time stamp correctly).

 * The file-attributes function truncates file time stamps to
   one-second resolution, making it impossible for a dired written in
   Emacs to emulate the behavior of "ls --full-time".

 * (format-time-string "%s.%N") is supposed to output
   nanosecond-resolution time stamps, but on the Emacs trunk it always
   outputs a multiple of one microsecond, even when the system clock
   supports nanosecond resolution.

 * If some other process modifies a file during the same second that
   Emacs gets the file's time stamp, Emacs won't notice the conflict,
   as the visited-file-modtime function supports only 1-second
   resolution.  If Emacs used nanosecond-resolution time stamps, this
   race condition would be much less likely.

None of these problems are fatal, but they are annoyances that could
lead to real problems (e.g., when working with "make", which uses
high-resolution file time stamps).

I've proposed a patch for this:

http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00015.html
http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00016.html
http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00017.html
http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00018.html
http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00019.html
http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00020.html
http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00021.html

Stefan asked me in
<http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00069.html>
to make the patch more upward-compatible, by appending a new
picosecond count to the end of the time stamp list, rather than
changing the microsecond to a nanosecond count (which would likely
break more code).  I'll do that soon, but thought I'd first file a bug
report to make this whole issue easier to track.

In part I am also following up to Stefan's suggestion
<http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00217.html>
to have a bug report for this issue.





^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-06-24 19:26 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05  6:40 bug#9000: patch for higher-resolution time stamps Paul Eggert
2011-07-05  6:57 ` bug#9000: More-compatible proposal, using (HIGH LOW USEC PSEC) " Paul Eggert
2011-07-06 17:00   ` bug#9000: Update time patch for Frandom, pthread_sigmask, etc Paul Eggert
2012-05-04 20:52 ` bug#9000: 2012-05-04 version of patch Paul Eggert
2012-05-27  3:08   ` Paul Eggert
2012-06-22 21:21 ` bug#9000: patch for higher-resolution time stamps Paul Eggert
2012-06-23  8:39   ` Eli Zaretskii
2012-06-23 10:48     ` Eli Zaretskii
2012-06-23 17:57       ` Paul Eggert
2012-06-23 19:09         ` Eli Zaretskii
2012-06-23 19:42           ` Eli Zaretskii
2012-06-23 22:45             ` Paul Eggert
2012-06-24  2:57               ` Eli Zaretskii
2012-06-24  4:31                 ` Paul Eggert
2012-06-24 19:26                   ` Eli Zaretskii
2012-06-23 18:55       ` Paul Eggert
2012-06-23 19:08         ` Eli Zaretskii
2012-06-23 22:34           ` Paul Eggert
2012-06-24 17:23             ` Eli Zaretskii

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.