Files
chatterino2/src/debug/Benchmark.hpp
pajlada 3c8992cac1 Remove FMT dependency (#1472)
All occurrences of log() have been replaced with qDebug()

bonus meme: remove a bunch of std::string usages in the pubsub client

Fixes #1467
2020-01-03 20:51:37 +01:00

22 lines
344 B
C++

#pragma once
#include <QDebug>
#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