All pastes #830012 Raw Edit

Unnamed

public text v1 · immutable
#830012 ·published 2007-12-23 18:22 UTC
rendered paste body

void CStatistics::FPSCounter(float Multiplyer)
{
static float sCurrentFPS = 0;							
static float sPreviousFPS = 0;	
char strFPS[50] = {0}; // Window name, consist of 50 char.

float NewFPS = (timeGetTime()*Multiplyer);		
++sCurrentFPS;

FrameTick = NewFPS - FrameTock;
FrameTock = NewFPS;

	if((NewFPS-sPreviousFPS)>1.0f)
    {
	sPreviousFPS = NewFPS;

sCurrentFPS = 0;
		}	
}