From bd4f82c8e8d4a527be23767ef0eb91887cc9e1f4 Mon Sep 17 00:00:00 2001 From: Nikita Smith Date: Fri, 8 Nov 2024 16:45:54 -0800 Subject: [PATCH] cursed early return --- src/os/core/linux/os_core_linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/os/core/linux/os_core_linux.c b/src/os/core/linux/os_core_linux.c index 4fab0ac7..86e57e98 100644 --- a/src/os/core/linux/os_core_linux.c +++ b/src/os/core/linux/os_core_linux.c @@ -158,16 +158,17 @@ internal U32 os_get_process_start_time_unix(void) { Temp scratch = scratch_begin(0,0); + U64 start_time = 0; pid_t pid = getpid(); String8 path = push_str8f(scratch.arena, "/proc/%u", pid); struct stat st; int err = stat((char*)path.str, &st); if(err == 0) { - return (U32)st.st_mtime; + start_time = st.st_mtime; } scratch_end(scratch); - return 0; + return (U32)start_time; } ////////////////////////////////