From: Jason S. Ninneman Date: Wed, 24 May 2017 06:46:20 +0000 (-0700) Subject: Remove a bad use of tv_nsec. X-Git-Tag: seed~64 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=627144354c9d16d1d6d6ea0fb2d5925ab16fffcb Remove a bad use of tv_nsec. --- diff --git a/misc.c b/misc.c index c4b7e73..b87c769 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; }