comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Strange behaviour of delay in Windows XP
Date: Sat, 9 Oct 2010 10:18:22 +0200
Date: 2010-10-09T10:18:19+02:00	[thread overview]
Message-ID: <ndp216n00fk2$.1eil4e3haxq6t$.dlg@40tude.net> (raw)
In-Reply-To: i8p2tf$cl9$1@munin.nbi.dk

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



  reply	other threads:[~2010-10-09  8:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 21:04 Strange behaviour of delay in Windows XP michael bode
2010-10-07 21:35 ` Vinzent Hoefler
2010-10-07 22:10   ` michael bode
2010-10-07 22:37 ` Jeffrey Carter
2010-10-08  5:18   ` michael bode
2010-10-08 10:13   ` michael bode
2010-10-08  0:15 ` Randy Brukardt
2010-10-08  5:33   ` michael bode
2010-10-09  6:42     ` Randy Brukardt
2010-10-09  8:18       ` Dmitry A. Kazakov [this message]
2010-10-26  1:50   ` Yannick Duchêne (Hibou57)
2010-10-08  7:54 ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox