diff options
Diffstat (limited to 'c/debug.h')
-rw-r--r-- | c/debug.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |