aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rng.ha3
1 files changed, 2 insertions, 1 deletions
diff --git a/rng.ha b/rng.ha
index 24e5177..30ac23a 100644
--- a/rng.ha
+++ b/rng.ha
@@ -43,7 +43,8 @@ export fn main() void = {
fmt::fatal("Can't generate the desired number of randoms without duplicates");
};
- const seed = time::unix(time::now(time::clock::MONOTONIC));
+ const now = time::now(time::clock::MONOTONIC);
+ const seed = (now.sec * time::SECOND) + now.nsec;
const r = random::init(seed: u32);
let rngs: []u32 = [];
defer free(rngs);