X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=b87c76913f6aab68b500979b20adce84fb05d443;hb=31837249f82629048f9010a0bf29112397a036f8;hp=c4b7e732c6fde159dd598395e5e237b2f063500b;hpb=61031ce55c0201ad6f57be634643ed898a8e86e6;p=open-adventure.git 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; }