From 8b25d37a37e8fde066c4510aef42a3fd4b566388 Mon Sep 17 00:00:00 2001 From: fourtf Date: Sun, 8 Oct 2017 17:23:46 +0200 Subject: [PATCH] added benchmark util --- src/util/benchmark.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/util/benchmark.hpp 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";