Added FPS profiling function.