added benchmark util
This commit is contained in:
@@ -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";
|
||||||
Reference in New Issue
Block a user