コード例 #1
0
void Window::redraw()
{
	if( QTime::currentTime() > lastDrawTime.addMSecs( 1000/FRAME ) )
	{
		checkFps();
		setDrawTime();
		repaint();
	}
}
コード例 #2
0
void AutomaticGraphicsLevelManager::averageTimePerFrameUpdated(const boost::posix_time::time_duration timePerFrame)
{
	//Convert microseconds per frame to fps.
	checkFps(1000000.0f / timePerFrame.total_microseconds());
}