aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2019-10-15 00:31:03 +0200
committerToni Uhlig <matzeton@googlemail.com>2019-10-15 00:31:03 +0200
commit98fc923d978d96cceff9a3bcc1cfe528a05178df (patch)
tree190a83cd39607a4d00ab34b1556473a1a8c26425
parenta53521b4c58ad3028ca8323dfd3a4e5dd95ce98d (diff)
print gdi update timings if _DEBUG set
-rw-r--r--GdiRadarLib/GdiRadar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/GdiRadarLib/GdiRadar.cpp b/GdiRadarLib/GdiRadar.cpp
index 5041af3..136b5f1 100644
--- a/GdiRadarLib/GdiRadar.cpp
+++ b/GdiRadarLib/GdiRadar.cpp
@@ -172,7 +172,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM l
break;
}
- //std::cout << "Default window proc for message 0x" << std::hex << message << std::endl;
return DefWindowProcW(hwnd, message, wparam, lparam);
}
@@ -298,7 +297,9 @@ bool gdi_radar_redraw_if_necessary(struct gdi_radar_context * const ctx)
end = clock();
cpu_time_used = ((double)(end - ctx->lastTimeUpdated)) / CLOCKS_PER_SEC;
+#ifdef _DEBUG
DBG("Time past after last update: %lf\n", cpu_time_used);
+#endif
if (cpu_time_used > ctx->minimumUpdateTime) {
if (cpu_time_used > ctx->minimumUpdateTime * ctx->maximumRedrawFails) {