本文整理汇总了C++中PerformanceTimer::restart方法的典型用法代码示例。如果您正苦于以下问题:C++ PerformanceTimer::restart方法的具体用法?C++ PerformanceTimer::restart怎么用?C++ PerformanceTimer::restart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PerformanceTimer
的用法示例。
在下文中一共展示了PerformanceTimer::restart方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: render
mixxx::Duration GLRGBWaveformWidget::render() {
PerformanceTimer timer;
mixxx::Duration t1;
//mixxx::Duration t2, t3;
timer.start();
// QPainter makes QGLContext::currentContext() == context()
// this may delayed until previous buffer swap finished
QPainter painter(this);
t1 = timer.restart();
draw(&painter, NULL);
//t2 = timer.restart();
//qDebug() << "GLRGBWaveformWidget" << t1 << t2;
return t1; // return timer for painter setup
}
示例2: render
int GLRGBWaveformWidget::render() {
PerformanceTimer timer;
int t1;
//int t2, t3;
timer.start();
// QPainter makes QGLContext::currentContext() == context()
// this may delayed until previous buffer swap finished
QPainter painter(this);
t1 = timer.restart();
draw(&painter, NULL);
//t2 = timer.restart();
// glFinish();
//t3 = timer.restart();
//qDebug() << "GLVSyncTestWidget "<< t1 << t2 << t3;
return t1 / 1000; // return timer for painter setup
}