All pastes #281982 Raw Edit

Stuff

public text v1 · immutable
#281982 ·published 2006-12-17 05:32 UTC
rendered paste body
Uint32 frames;
Uint32 ticks;
Uint32 mins;
Uint32 secs;

void updatefps ()
	{
	frames++;

	if (SDL_GetTicks() >= ticks + 2000)
		{
		int fps = int(frames/2);
		printf("%d fps\n", fps);
		frames = 0;
		ticks = SDL_GetTicks();
		}	
	}