From 26f67901ccacae74fd610e3e9a5f5b4c48d81a69 Mon Sep 17 00:00:00 2001 From: Alec Murphy Date: Tue, 8 Apr 2025 07:16:57 -0400 Subject: [PATCH] System/Libraries/System: Add timestamp to System.Log() --- System/Libraries/System.HC | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/System/Libraries/System.HC b/System/Libraries/System.HC index 3ad4085..38f86df 100644 --- a/System/Libraries/System.HC +++ b/System/Libraries/System.HC @@ -60,7 +60,8 @@ U0 @system_log(CTask* task, U8* fmt, ...) MemCpyU32(&task->pad, &color, 1); } U8* log_msg = MAlloc(1024); - StrPrint(log_msg, "[\x1b[38;2;%d;%d;%dm%16s\x1b[0m] %s\n", + StrPrint(log_msg, "[%d][\x1b[38;2;%d;%d;%dm%16s\x1b[0m] %s\n", + SysTimerRead, color.u8[3] << 5 & 0xFF, color.u8[2] << 4 & 0xFF, color.u8[1] << 3 & 0xFF, Fs->task_name, buf); FifoI64Ins(System.log_fifo, log_msg);