From 4a427b6acf8fcc7ee8d1318faabf147d29d3a866 Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Mon, 12 Jan 2026 23:55:44 +0000 Subject: Added hash seed randomizer and fixed truncation bug int variables --- std/time.zc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'std/time.zc') diff --git a/std/time.zc b/std/time.zc index 72e611a..1191821 100644 --- a/std/time.zc +++ b/std/time.zc @@ -29,7 +29,16 @@ impl Duration { struct Time {} +extern size_t __zen_hash_seed; + impl Time { + fn randomize_hash() { + raw { + srand(time(NULL)); + __zen_hash_seed ^= (size_t)rand(); + } + } + fn now() -> U64 { return _time_now_impl(); } -- cgit v1.2.3