Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // --- simple FPS vars and function
- int FPScounter = 0;
- float FPSfLastTickCount = 0.0f;
- float FPSfCurrentTickCount;
- void FPScheck(char *str, char *format)
- {
- FPSfCurrentTickCount = (clock() * 0.001f);
- FPScounter++;
- if((FPSfCurrentTickCount - FPSfLastTickCount) > 1.0f) {
- FPSfLastTickCount = FPSfCurrentTickCount;
- sprintf(str,format,FPScounter);
- FPScounter = 0;
- }
- }
Add Comment
Please, Sign In to add comment