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,FREEMAIL_FROM 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!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: michael bode Newsgroups: comp.lang.ada Subject: Re: Strange behaviour of delay in Windows XP Date: Fri, 08 Oct 2010 00:10:39 +0200 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 7 Oct 2010 22:10:41 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="LsJMQgeB2+MUtf72DDdSBQ"; logging-data="22315"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lp230XYbORsOyjmUV8G/I06NWqXTlq9o=" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 In-Reply-To: Cancel-Lock: sha1:LkovKElxatKe4aa99xuIxtcNftY= Xref: g2news1.google.com comp.lang.ada:14425 Date: 2010-10-08T00:10:39+02:00 List-Id: Am 07.10.2010 23:35, schrieb Vinzent Hoefler: > Obviously your lab is very CPU intensive. ;) Or has bad feng shui ;-) >> Most of the time. Sometimes I got 1.0xxs. There was no noticeable CPU >> load during the tests. > > That's probably the explanation. Firstly, Windows is by no means an RTOS, > secondly GNAT's relative delay implementation uses the Sleep call, which > is quite crude when it comes to clock resolution (15 ms and more). > Add CPU load, disk activity and things and the delay can easily exceed > the "expected" time depending on when Windows decides to return from sleep. There was NO load during all the tests. And 2.7s instead of 1.0? These are relativly current machines with 3GHz Core2Duo CPU. > With "delay until" you should get better results. Even adding a task could > help, because with tasking enabled, GNAT uses a different and more precise > implementation AFAIK. Good hint, I will try if delay until has different behaviour.