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