From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNAT Modification_Time limitation
Date: Tue, 20 Nov 2018 17:32:21 -0600
Date: 2018-11-20T17:32:21-06:00 [thread overview]
Message-ID: <pt25i5$886$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: lnefbgr0rz.fsf@kst-u.example.com
"Keith Thompson" <kst-u@mib.org> wrote in message
news:lnefbgr0rz.fsf@kst-u.example.com...
...
> If you're on a non-POSIX system, there might still be a
> system-specific way to get a more precise timestamp. (NTFS also
> seems to store timestamps with high precision.)
NTFS has three timestamps (modification, creation, and last access). Only
the modification has high precision; the others are only good to full
seconds (or something like that).
FAT file systems (as you might encounter on a camera or USB stick) only have
precision to 2 seconds. (Which is why we had to deal with this in the
Janus/Ada build tools fairly early on.)
Also note that the system clock on Windows systems typically only changes
every 0.01 sec (Dmitry says this can be changed, although I've never seen
that done). That extends to the file systems and other OS timers as well.
Most Ada vendors use a Ada.Calendar.Clock that blends the system clock with
the high performance timer to get useful accuracy of of Ada.Calendar.Time.
(A customer/collaborator, Tom Moran, originally wrote that code the the
Janus/Ada implementation of Calendar to fix some timing problem that he had.
He eventually submitted similar code to AdaCore who added it to their
Calendar as well.)
Moral: Doing "Make" on a modern machine, especially if you want it to be
portable, is a tricky job.
Randy.
next prev parent reply other threads:[~2018-11-20 23:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 22:56 GNAT Modification_Time limitation Lionel Draghi
2018-11-20 0:47 ` Shark8
2018-11-20 1:33 ` Keith Thompson
2018-11-20 1:33 ` Keith Thompson
2018-11-20 23:32 ` Randy Brukardt [this message]
2018-11-21 8:23 ` Dmitry A. Kazakov
2018-11-20 8:08 ` briot.emmanuel
2018-11-20 11:57 ` Lionel Draghi
2018-11-21 7:40 ` briot.emmanuel
2018-11-21 11:16 ` briot.emmanuel
2018-11-21 19:13 ` Lionel Draghi
2018-11-21 19:02 ` Lionel Draghi
2018-11-21 19:48 ` Simon Wright
2018-11-21 22:14 ` Lionel Draghi
2018-11-20 23:53 ` Randy Brukardt
2018-11-21 7:31 ` briot.emmanuel
2018-11-21 14:38 ` Shark8
2018-11-21 17:32 ` Simon Wright
2018-11-21 17:43 ` briot.emmanuel
2018-11-21 23:34 ` Randy Brukardt
2018-11-22 8:15 ` briot.emmanuel
2018-11-26 23:45 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox