> Date: Tue, 19 Apr 2022 15:22:29 -0700 > Cc: [email protected], [email protected], [email protected] > From: Paul Eggert <[email protected]> > > On 4/18/22 22:50, Eli Zaretskii wrote: > >> * admin/merge-gnulib (GNULIB_MODULES): Add gettime-res. > >> * lib/gettime-res.c: New file, copied from Gnulib. > >> * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. > > Is this known to support MS-Windows correctly? > > I haven't tested it on that platform, though I expect it to work since > it relies only on current_timespec and Emacs already uses that. > > I just now added some test cases to Gnulib for it; see the patch in the > first attachment. You can try these tests in your environment by running > './gnulib-tool --test gettime-res' in the Gnulib source directory. Or > you can save time by running './configure; make check' in the directory > represented by the second attachment, which is a compressed tarball > containing the output of './gnulib-tool --create-testdir --dir > test-gettime-res gettime-res'.
Thanks, the test-gettime-res test says "gettime_res returned 625000 ns", which is a strange number: it doesn't fit any MS-Windows system time resolution figure I know about. Do you happen to know what does this number represent, and why it is the result of gettime-res.c when it runs on MS-Windows? AFAIK, the basic resolution of MS-Windows time stamps is 100 ns, so using the above much larger number seems to hint at some significant loss of information. If the goal of this future changeset is to make Emacs time stamps more fine-grained, it would be a shame not to have the 100-ns resolution on MS-Windows.
