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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news3.google.com!feeder.news-service.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Strange behaviour of delay in Windows XP Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Sat, 9 Oct 2010 10:18:22 +0200 Message-ID: NNTP-Posting-Date: 09 Oct 2010 10:18:19 CEST NNTP-Posting-Host: c943e95a.newsspool2.arcor-online.net X-Trace: DXC=][fWTB7T:be:i=48;n?Z:`A9EHlD;3Ycb4Fo<]lROoRa8kF On Sat, 9 Oct 2010 01:42:54 -0500, Randy Brukardt wrote: > In Janus/Ada, I had to write code to busy-wait if the delay time is less > than 0.1s; we only call Sleep if the delay time is longer. (That doesn't > always work right, either, but I'm not quite sure why.) Call timeBeginPeriod (1) somewhere upon elaboration of Claw, and then you will be able to wait for 1ms. Note that it is not just Sleep, which depends on this setting, actually all waitable timers and scheduling are. The effect of timeBeginPeriod is global (I like Windows (:-)), which is not bad, unless you have some 66MHz i486. P.S. I think it is 1ms since Windows XP. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de