This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cygwin newbie and timing!


Hi all!

I'm trying to measure the frame rate of my realtime application and to
also scale movement according to it, so it runs at the same speed on all
processors. I found something here:

http://www.gamedev.net/reference/programming/game/article753.asp

At the bottom of the page there are some simple sample programs to try.
There's one DJGPP version and one for VC. However, I'm using Cygwin, and
I don't know if that's the same as DJGPP. I tried the DJGPP version
first

-The precompiled version of the DJGPP sample achieves an incredible
>13000 frames per second
-The precompiled version of the VC sample achieves a pretty good >~1300
frames per second

-The REcompiled and modified version of the DJGPP sample achieves a
pretty bad ~65 frames per second - I modified it to use the Cygwin
equivalents clock() instead of DJGPPs uclock() et al.
-The REcompiled and modified version of the VC sample also achieves a
pretty good >~1000 frames per second

But why in hell is the DJGPP version SO much faster than the Cygwin
version??? I just changed a few characters/lines....

Can I somehow read an set the timer frequency for clock(), like I could
read/set it with the Windows API functions QueryPerformanceFrequency et
al.?

What else can I do to get high resolution timing?

I must be doing something wrong here, so help is very much appreciated!

Karsten


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]