summaryrefslogtreecommitdiff
path: root/src/macro.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/macro.h')
-rw-r--r--src/macro.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/macro.h b/src/macro.h
new file mode 100644
index 0000000..9bcc8e0
--- /dev/null
+++ b/src/macro.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <chrono>
+#include <iostream>
+
+#define start_timer(name) \
+ std::chrono::steady_clock::time_point begin_##name = std::chrono::steady_clock::now();
+
+#define stop_timer(name) \
+ std::chrono::steady_clock::time_point end_##name = std::chrono::steady_clock::now(); \
+ // std::cout << #name << " (us): " \
+ // << std::chrono::duration_cast<std::chrono::microseconds>(end_##name - begin_##name) \
+ // << std::endl;
+
+#define INIT_FIELD(name) m_##name(name)
+
+#define INNO_MAKER