diff --git a/src/util/benchmark.hpp b/src/util/benchmark.hpp new file mode 100644 index 000000000..469c6362b --- /dev/null +++ b/src/util/benchmark.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include +#include + +#define BENCH(x) \ + QElapsedTimer x; \ + x.start(); + +#define MARK(x) \ + qDebug() << __FILE__ << __LINE__ << static_cast(x.nsecsElapsed()) / 100000.0 << "ms";