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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71d1e36fcaaa9b90 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-12 00:26:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newshub.sdsu.edu!elnk-pas-nf2!newsfeed.earthlink.net!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc01.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Help with anormal pausing of program References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1055402794 12.234.13.56 (Thu, 12 Jun 2003 07:26:34 GMT) NNTP-Posting-Date: Thu, 12 Jun 2003 07:26:34 GMT Organization: AT&T Broadband Date: Thu, 12 Jun 2003 07:26:34 GMT Xref: archiver1.google.com comp.lang.ada:39032 Date: 2003-06-12T07:26:34+00:00 List-Id: >I see that we are talking about two different problems? The MSKB article >talks about leaps forward, but your test program shows leaps back. In >reality, more that leaps, it seems that some value is mangled because -- Some buggy chipsets have a counter that appears to run backwards -- under heavy load (see Q274323), and Windows corrects this by -- adding 2**24 (5-15 sec). Yuck! We need to try to detect this So Gnat 3.14p had a clock that could jump forward several seconds. The fix is to watch for a suspicious jump, check it against the Windows system clock, and correct if needed. For that you need the system clock and the performance counter values at some base synchronization point. Gnat 3.15p failed to recalculate the base when it did a resynchronization, so, IIRC, time would go into the future, and a short "delay" would become a long one, waiting for the future time. It's late, and I'm tired, so I don't guarantee this is right, but it appears my fix for Gnat 3.15p was to add the line Base_Monotonic_Clock := Base_Clock; at line 165 of s-osprim.adb, just before the line end Get_Base_Time; and then to compile with gcc -c -gnatg -O2 s-osprim.adb Because of heavy inlining, you'll find other parts of the Gnat run-time that also need recompiling the same way.