From 98fc923d978d96cceff9a3bcc1cfe528a05178df Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Tue, 15 Oct 2019 00:31:03 +0200 Subject: print gdi update timings if _DEBUG set --- GdiRadarLib/GdiRadar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3