mirror-chatterino2/src/util/benchmark.hpp

12 lines
235 B
C++
Raw Normal View History

2017-10-08 17:23:46 +02:00
#pragma once
#include <QDebug>
#include <QElapsedTimer>
#define BENCH(x) \
QElapsedTimer x; \
x.start();
#define MARK(x) \
qDebug() << __FILE__ << __LINE__ << static_cast<float>(x.nsecsElapsed()) / 100000.0 << "ms";