From a1ee6fbb2a2a93b695031fdbf6d8564eae72b42f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 7 Oct 2020 07:48:56 -0700 Subject: random: use nanoseconds for seeding. * rand.c (make_random_state): Use time_sec_nsec to obtain a time with nanoseconds, instead of time_sec_usec. --- rand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rand.c b/rand.c index e63dbd3e..133b3d2a 100644 --- a/rand.c +++ b/rand.c @@ -166,7 +166,7 @@ val make_random_state(val seed, val warmup) #error port me! #endif } else if (nilp(seed)) { - val time = time_sec_usec(); + val time = time_sec_nsec(); r->state[0] = convert(rand32_t, c_num(car(time), self)); r->state[1] = convert(rand32_t, c_num(cdr(time), self)); #if HAVE_UNISTD_H -- cgit v1.2.3