added benchmark util

This commit is contained in:
fourtf 2017-10-08 17:23:46 +02:00
parent 7a99d90337
commit 8b25d37a37

11
src/util/benchmark.hpp Normal file
View file

@ -0,0 +1,11 @@
#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";