Advertisement

problem using my FPS function

Started by December 06, 2001 12:25 PM
-1 comments, last by da_cobra 22 years, 9 months ago
I have the following function ///////////////////////////////////////// // function that returns the framerate // ///////////////////////////////////////// int GetFramerate() { frameratecounter++ ; if (Framerate.getMsEllapsed()>=1000) { Framerate.reset() ; frameratecounter=0 ; } // end of if Framerate.getMsEllapsed() return frameratecounter ; } // end of getframerate() and in my gameloop I have Framerate=GetFramerate() ; and a function that shows Framerate but when I run my game i see a counter that counts to +/- 70 and then restarts so I guess my framerate is +/- 70 but what am I doing wrong how do I get a steady number (I already looked in the forum, but because I want to use my own function I want to solve this problem) thanx in advance

This topic is closed to new replies.

Advertisement