From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GNAT Modification_Time limitation Date: Tue, 20 Nov 2018 17:32:21 -0600 Organization: JSA Research & Innovation Message-ID: References: <0577e947-d691-4b81-aca6-b2e86bbef634@googlegroups.com> Injection-Date: Tue, 20 Nov 2018 23:32:22 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="8454"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 X-RFC2646: Format=Flowed; Original Xref: reader01.eternal-september.org comp.lang.ada:54851 Date: 2018-11-20T17:32:21-06:00 List-Id: "Keith Thompson" 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.