GNU bug report logs -
#61240
improve high-res file timestamp in Automake
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Thu, 2 Feb 2023 22:26:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #22 received at 61240 <at> debbugs.gnu.org (full text, mbox):
On 2023-02-04 16:02, Jacob Bachmeyer wrote:
> In any case, you will still need to account for the possibility that
> Time::HiRes::stat() might not actually have higher resolution, depending
> on the filesystem.
That's fine. All we want is the exact file timestamp. If the file system
timestamp resolution is only 2 s, then we want that multiple of 2.
Admittedly we can't get the exact file timestamp on many modern file
systems since Time::HiRes is precise only to the nearest ~238 ns for
today's timestamps, but the idea is to get what we easily can.
> There are also the no-runtime-overhead options of using "eval { use Time::HiRes qw(stat) };" which will replace stat() with the hi-res version if it is available and continue with the regular stat() builtin if not, or "use constant HAVE_Time_HiRes => eval { use Time::HiRes };" and a conditional "if (HAVE_Time_HiRes) { ... } else { ... }" as I suggested as an improvement to Mike Frysinger's patch.
Sorry, I don't remember seeing that suggestion. I guess it was in
another thread. Could you resend that patch to 61240 <at> debbugs.gnu.org and
cc me? Preferably a patch against the latest Automake, in "git
format-patch" format; see <https://savannah.gnu.org/git/?group=automake>
for how to get bleeding-edge Automake. The idea would be to port
bleeding-edge Automake to Perl < 5.10 when that's easy.
Please bear in mind that I stopped coding in Perl 30 years ago and so am
a bit rusty.
This bug report was last modified 2 years and 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.