This is quite useful to see how much time the rest of the app takes.
The same information has been available in QtQuick1.
Change-Id: I31ae91bfa764a4d8013af80de9459514ed72314f
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
#ifdef QQUICK_RENDER_TIMING
if (qquick_render_timing()) {
+ static QTime lastFrameTime = QTime::currentTime();
swapTime = threadTimer.elapsed() - renderTime;
qDebug() << "- Breakdown of frame time; sync:" << syncTime
<< "ms render:" << renderTime << "ms swap:" << swapTime
- << "ms total:" << swapTime + renderTime << "ms";
+ << "ms total:" << swapTime + renderTime
+ << "ms time since last frame:" << (lastFrameTime.msecsTo(QTime::currentTime()))
+ << "ms";
+ lastFrameTime = QTime::currentTime();
}
#endif
}
if (qquick_render_timing()) {
+ static QTime lastFrameTime = QTime::currentTime();
const int swapTime = renderTimer.elapsed() - renderTime;
qDebug() << "- Breakdown of frame time; sync:" << syncTime
<< "ms render:" << renderTime << "ms swap:" << swapTime
- << "ms total:" << swapTime + renderTime << "ms";
+ << "ms total:" << swapTime + renderTime
+ << "ms time since last frame:" << (lastFrameTime.msecsTo(QTime::currentTime()))
+ << "ms";
+ lastFrameTime = QTime::currentTime();
}
// Might have been set during syncSceneGraph()