summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b74ac16)
raw | patch | inline | side by side (parent: b74ac16)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Fri, 13 Nov 2015 12:55:35 +0000 (14:55 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Fri, 13 Nov 2015 20:12:41 +0000 (22:12 +0200) |
libkmstest/testpat.cpp | patch | blob | history |
diff --git a/libkmstest/testpat.cpp b/libkmstest/testpat.cpp
index b054cf6d6f822116fbcef3ed5bd7b948d1b5102b..007860ff37b9b53854f464f6447f989147533462 100644 (file)
--- a/libkmstest/testpat.cpp
+++ b/libkmstest/testpat.cpp
+//#define DRAW_PERF_PRINT
+
#include <chrono>
#include <cstring>
#include <cassert>
void draw_test_pattern(DumbFramebuffer& fb)
{
+#ifdef DRAW_PERF_PRINT
using namespace std::chrono;
auto t1 = high_resolution_clock::now();
+#endif
draw_test_pattern_impl(fb);
+#ifdef DRAW_PERF_PRINT
auto t2 = high_resolution_clock::now();
auto time_span = duration_cast<microseconds>(t2 - t1);
printf("draw took %u us\n", (unsigned)time_span.count());
+#endif
}
}