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-Thread: 103376,349427c451f66022 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Strange behaviour of delay in Windows XP Date: Thu, 7 Oct 2010 19:15:40 -0500 Organization: Jacob Sparre Andersen Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1286496941 2769 69.95.181.76 (8 Oct 2010 00:15:41 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 8 Oct 2010 00:15:41 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Xref: g2news1.google.com comp.lang.ada:14429 Date: 2010-10-07T19:15:40-05:00 List-Id: "michael bode" wrote in message news:i8lcl2$f0i$1@news.eternal-september.org... ... > But I have a (or rather 2) Dell Vostro MT 220 PC where the actual delay > is about 2.7s instead. Tested with GNAT GPL 2008 and 2009 on XP. Another > almost identical Vostro MT 230 works as expected. And to make it more > interesting when I brought the Vostro 220 from my lab to my office it > worked as expected. Back to the lab I got the 2.7s delay again. Most of > the time. Sometimes I got 1.0xxs. There was no noticeable CPU load > during the tests. Then I booted the machine from a Ubuntu Live CD and > tested with the program compiled under Debian Lenny. It worked as > expected: 1.000xxx seconds delay. > > Any ideas or should I call a feng shui master? I have no ideas about your specific problem, but we found when building Claw that delays were quite unreliable on Windows. One compiler insisted on delaying a full clock tick (0.1s) even for "delay 0.0;" (used to mean "yield"; Ada 2012 will actually have a call named "yield") -- this was a disaster as we were using it in the primary message loop (adding 0.1s per message slowed apps to a crawl). All were inaccurate to some extent or another. All were improved to some extent or another after we filed bug reports. It wouldn't be hard to do something in an implementation of "delay" that caused a time explosion in some case or another. Randy.