summaryrefslogtreecommitdiff
path: root/include/log.hpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-09-12 16:35:40 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-09-12 16:35:40 +0200
commitabf01f657d068aa6b22ab962cbe01b88f3b5f7ea (patch)
tree2a354a6112ef0b9ef6975613f12865831f5d4a69 /include/log.hpp
parentd174d803de2296061731c3698980a6a51e6fc3ef (diff)
event logging
Diffstat (limited to 'include/log.hpp')
-rw-r--r--include/log.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/log.hpp b/include/log.hpp
index dcb2987..f34cc27 100644
--- a/include/log.hpp
+++ b/include/log.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "timer.h"
#include "imgui.h"
#include "config.hpp"
@@ -12,4 +13,8 @@ typedef struct {
char history[MAX_LEN_LOG_HISTORY][MAX_LEN_LOG_TXT];
} log;
-void log_add(double timestamp, const char* fmt, ...) IM_FMTARGS(2); \ No newline at end of file
+#define STOPWATCH_START tick_t timestamp_start = timer_current();
+#define STOPWATCH_TIME (timer_elapsed(timestamp_start)*1000.0f)
+
+log* get_log();
+void log_add(const char* fmt, ...) IM_FMTARGS(2); \ No newline at end of file