Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Sleep

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Sleep
CGamesPlay
Member #2,559
July 2002
avatar

You going to provide any more information on the subject?

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

A J
Member #3,025
December 2002
avatar

Are you asking me too ?

win32::timeBeginPeriod()

___________________________
The more you talk, the more AJ is right. - ML

CGamesPlay
Member #2,559
July 2002
avatar

Very handy. Thanks for the info. Is there any way we might be able to integrate this into Allegro? Perhaps if someone calls rest(1), call timeBeginPeriod(1) the first time it happens?

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

A J
Member #3,025
December 2002
avatar

there are subtle problems that may occur whilst using this timeBeginPeriod(1)'feature'.. M$ mentions it occasionaly in there "docs" but never really gets to the point, perhaps as its a very advanced topic.

But from the limited data i have on it, i think the problems relates to possible drift, in that you dont always get exactly 1ms, which is M$ way of saying "you can ask for 1ms, and we can tell you its 1ms, but we were too stoopid to actually code it properly, so you may get something around 1ms". I think they also never mentioned it too much in the older literature because on older/slower hardware running at 1ms res caused excessive overhead and acute starvation, thereby making what programmers thought was helping actually worse; however on the newer/faster Ghz machines 1ms should be fine, i have ran 1ms on an AMD2500+ for over a year without problems, and that is a fairly old/slow machine by todays standards.

I also have test code that i use to prove it on each machine i use, and on the Ghz machines, its pretty close to 1ms.

want/need code.. just ask (i have to dig it out, so will not post yet until needed).

___________________________
The more you talk, the more AJ is right. - ML

 1   2 


Go to: