From 060601da2fcb174f87489489431529aa3e9f694a Mon Sep 17 00:00:00 2001 From: "Jason S. Ninneman" Date: Tue, 23 May 2017 23:46:20 -0700 Subject: [PATCH] Remove a bad use of tv_nsec. --- misc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc.c b/misc.c index 7d9f4ec..18bdd7a 100644 --- a/misc.c +++ b/misc.c @@ -761,9 +761,7 @@ long TSTBIT; void set_seed_from_time(void) { /* Use the current system time to get seed the ISO rand() function, from which we get a seed for the LCG. */ - struct timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - srand(ts.tv_nsec); + srand(time(NULL)); lcgstate.x = (unsigned long) rand() % lcgstate.m; } -- 2.31.1