This topic is now archived and is closed to further replies.

[Newbie] How to find out the FRAME RATES per SECOND?

This topic is 6390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here is one way to do it:

Call this function from your message pump:

/* code start

int g_iFPS; //gloabal int variable to store frame rate
#include // For timeGetTime

void FrameRate()
static int iFramesPerSecond;
static DWORD iLastTimeValue;

if(timeGetTime() - iLastTimeValue >= 1000)
g_iFPS = iFramesPerSecond;
iFramesPerSecond = 0;
iLastTimeValue = timeGetTime();

*/ code end }

Gandalf the White

Edited by - Gandalf on June 16, 2000 5:59:51 AM

Edited by - Gandalf on June 16, 2000 6:00:46 AM

Share this post

Link to post
Share on other sites