From abf01f657d068aa6b22ab962cbe01b88f3b5f7ea Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Fri, 12 Sep 2025 16:35:40 +0200 Subject: event logging --- include/log.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/log.hpp') 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 -- cgit v1.2.3-70-g09d2