diff options
| -rw-r--r-- | rng.ha | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |
