🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

problem using my FPS function

Started by
-1 comments, last by da_cobra 22 years, 6 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