src/debug.h
branchgamebalance
changeset 9912 1ac8aac92385
parent 9895 7bd07f43b0e3
--- a/src/debug.h	Wed Jun 13 11:45:14 2007 +0000
+++ b/src/debug.h	Wed Jun 13 12:05:56 2007 +0000
@@ -97,7 +97,27 @@
 	#define OTTD_PRINTF64 "ll"
 #endif
 
-/* Used for profiling */
+/* Used for profiling
+ *
+ * Usage:
+ * TIC();
+ *   --Do your code--
+ * TOC("A name", 1);
+ *
+ * When you run the TIC() / TOC() multiple times, you can increase the '1'
+ *  to only display average stats every N values. Some things to know:
+ *
+ * for (int i = 0; i < 5; i++) {
+ *   TIC();
+ *     --Do yuor code--
+ *   TOC("A name", 5);
+ * }
+ *
+ * Is the correct usage for multiple TIC() / TOC() calls.
+ *
+ * TIC() / TOC() creates it's own block, so make sure not the mangle
+ *  it with an other block.
+ **/
 #define TIC() {\
 	extern uint64 _rdtsc();\
 	uint64 _xxx_ = _rdtsc();\