byte StringFPS[255];
dword FPS;
dword LastTime;

ViewFPS(dword hWnd_handle)
{
	$push EBX
	EBX=EAX=GetTickCount();
//	IF(LastTime==0)LastTime=EAX;
	FPS++;
	IF(EAX-LastTime>=1000){
		LastTime=EBX;
		wsprintf(#StringFPS,"md2view v0.0, OpenGL, FPS %d",FPS);
		SetWindowText(hWnd_handle,#StringFPS);
		FPS=0;
	}
	$pop EBX

}
