diff options
| author | nasr <nsrddyn@gmail.com> | 2026-04-16 22:00:14 +0200 |
|---|---|---|
| committer | nasr <nsrddyn@gmail.com> | 2026-04-16 22:00:14 +0200 |
| commit | 13d9e4df0f4555079d16313a54c6035e22d575a6 (patch) | |
| tree | a0a80aedf61a892bf90daf02690de9335e6fc7a8 /source/base/base_rand.h | |
| parent | 8ea6a3c8621287d11296b8300029f32a27743d9a (diff) | |
feature(base): attempt at generating a random number
Diffstat (limited to 'source/base/base_rand.h')
| -rw-r--r-- | source/base/base_rand.h | 5 |
1 files changed, 2 insertions, 3 deletions
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 @@ | |||
| 12 | internal u64 | 12 | internal u64 |
| 13 | generate_random_u64(u64 constant) | 13 | generate_random_u64(u64 constant) |
| 14 | { | 14 | { |
| 15 | 15 | time_t current_time = time(0); | |
| 16 | time_t current_time = time(NULL); | 16 | constant = current_time ^ constant; |
| 17 | return current_time ^ constant; | ||
| 18 | 17 | ||
| 19 | constant += 0x9e3779b97f4a7c15; | 18 | constant += 0x9e3779b97f4a7c15; |
| 20 | 19 | ||
