delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/05/14/14:14:53

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <391EFD25.5735E2A0@starconcept.com>
Date: Sun, 14 May 2000 21:23:17 +0200
From: Karsten Wutzke <karsten DOT wutzke AT starconcept DOT com>
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019