void MediumModeWindow::startTime() { _chronometre = new QTimer; _chronometre->start(1000); connect(_chronometre, SIGNAL(timeout()), this, SLOT(newSecond())); connect(this, SIGNAL(addSeconde(int)), this, SLOT(updateLabel(int))); }
void Telemetry::endFrame() { sf::Time end = mClock.getElapsedTime(); sf::Time frameLen = end-mStart; mLastSecond += frameLen; ++mFrames; pushDT(frameLen.asSeconds()); if (mLastSecond.asSeconds() > 1) { mLastSecond = sf::milliseconds(0); pushFPS(mFrames); mFrames = 0; newSecond(); } }