From 13d9e4df0f4555079d16313a54c6035e22d575a6 Mon Sep 17 00:00:00 2001 From: nasr Date: Thu, 16 Apr 2026 22:00:14 +0200 Subject: feature(base): attempt at generating a random number --- source/base/base_rand.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/base/base_rand.h') diff --git a/source/base/base_rand.h b/source/base/base_rand.h index 86acafe..bfdab0f 100644 --- a/source/base/base_rand.h +++ b/source/base/base_rand.h @@ -12,9 +12,8 @@ internal u64 generate_random_u64(u64 constant) { - - time_t current_time = time(NULL); - return current_time ^ constant; + time_t current_time = time(0); + constant = current_time ^ constant; constant += 0x9e3779b97f4a7c15; -- cgit v1.3