aboutsummaryrefslogtreecommitdiff
path: root/c/debug.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-04 16:26:27 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-04 17:25:01 +0200
commit2ac7d06a503b256b290678f5bba158bf7d219bdd (patch)
tree86abdf303f8a3059efbd040c6eae95accf5b432c /c/debug.h
parent407b6cab4093b3c0ee23412ac07cf83fd9f03b82 (diff)
downloadEpisodeBrowser-2ac7d06a503b256b290678f5bba158bf7d219bdd.tar.gz
Add comments.
Diffstat (limited to 'c/debug.h')
-rw-r--r--c/debug.h10
1 files changed, 9 insertions, 1 deletions
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