mirror-chatterino2/src/debug/Benchmark.hpp
2018-08-11 14:26:02 +02:00

23 lines
352 B
C++

#pragma once
#include "debug/Log.hpp"
#include <QElapsedTimer>
#include <boost/noncopyable.hpp>
namespace chatterino {
class BenchmarkGuard : boost::noncopyable
{
public:
BenchmarkGuard(const QString &_name);
~BenchmarkGuard();
qreal getElapsedMs();
private:
QElapsedTimer timer_;
QString name_;
};
} // namespace chatterino