24 lines
570 B
C++
24 lines
570 B
C++
|
|
#include "fav_profile.h"
|
|
#if (PROFILE_BUILD)
|
|
#include <QDebug>
|
|
FAVProfile::FAVProfile(QObject *parent) : QObject(parent)
|
|
{
|
|
}
|
|
qint64 FAVProfile::elapsed(QString msg) {
|
|
|
|
qint64 r = instance()->_timer.elapsed();
|
|
qInfo() << "FA_PROFILE:" << r << msg;
|
|
return r;
|
|
}
|
|
void FAVProfile::restart(QString msg) {
|
|
instance()->_timer.restart();
|
|
qInfo() << "FA_PROFILE:" << msg;
|
|
}
|
|
void FAVProfile::lapEnd(QString msg)
|
|
{
|
|
qint64 r = instance()->_timer.elapsed();
|
|
qInfo() << "FA_PROFILE LAP:" << r - instance()->_lastLap << msg;
|
|
}
|
|
#endif // #if (PROFILE_BUILD)
|