mirror-chatterino2/src/debug/Benchmark.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
345 B
C++
Raw Normal View History

#pragma once
#include <boost/noncopyable.hpp>
#include <QElapsedTimer>
#include <QString>
2019-10-07 15:46:08 +02:00
namespace chatterino {
class BenchmarkGuard : boost::noncopyable
{
public:
BenchmarkGuard(const QString &_name);
~BenchmarkGuard();
qreal getElapsedMs();
private:
QElapsedTimer timer_;
QString name_;
};
2019-10-07 15:46:08 +02:00
} // namespace chatterino