mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
3c8992cac1
All occurrences of log() have been replaced with qDebug() bonus meme: remove a bunch of std::string usages in the pubsub client Fixes #1467
22 lines
403 B
C++
22 lines
403 B
C++
#include "Benchmark.hpp"
|
|
|
|
namespace chatterino {
|
|
|
|
BenchmarkGuard::BenchmarkGuard(const QString &_name)
|
|
: name_(_name)
|
|
{
|
|
timer_.start();
|
|
}
|
|
|
|
BenchmarkGuard::~BenchmarkGuard()
|
|
{
|
|
qDebug() << this->name_ << float(timer_.nsecsElapsed()) / 1000000.0f
|
|
<< "ms";
|
|
}
|
|
|
|
qreal BenchmarkGuard::getElapsedMs()
|
|
{
|
|
return qreal(timer_.nsecsElapsed()) / 1000000.0;
|
|
}
|
|
|
|
} // namespace chatterino
|