From 2ac7d06a503b256b290678f5bba158bf7d219bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 4 Aug 2022 16:26:27 +0200 Subject: Add comments. --- c/debug.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'c/debug.h') diff --git a/c/debug.h b/c/debug.h index 83ff289..f58c700 100644 --- a/c/debug.h +++ b/c/debug.h @@ -1,11 +1,18 @@ #ifndef DEBUG_H #define DEBUG_H +/* Benchmark objects measure and print the time in microseconds + * between construction and destruction. Given a unique id, they also + * calculate a running average of the last `avgmax' instances of + * objects of the same id. */ struct Benchmark { Benchmark(const char* name, int id, int avgmax); ~Benchmark(); + + /* Don't print time on destruction. */ void Disable(); + long long ticks; bool disabled = false; int id; @@ -13,6 +20,7 @@ struct Benchmark const char* name; }; -const char* MsgName(unsigned uMsg); +/* Return name of given window message (WM_*). */ +const char* WmName(unsigned uMsg); #endif -- cgit v1.2.3