projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61031ce
)
Remove a bad use of tv_nsec.
6/head
author
Jason S. Ninneman
<jsn@mbar.us>
Wed, 24 May 2017 06:46:20 +0000
(23:46 -0700)
committer
Jason S. Ninneman
<jsn@mbar.us>
Wed, 24 May 2017 06:46:20 +0000
(23:46 -0700)
misc.c
patch
|
blob
|
history
diff --git
a/misc.c
b/misc.c
index c4b7e732c6fde159dd598395e5e237b2f063500b..b87c76913f6aab68b500979b20adce84fb05d443 100644
(file)
--- 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;
}