1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-07-21 16:14:14 -04:00

Replace "tv.tv_sec * tv.tv_usec" with "tv.tv_sec + tv.tv_usec"

This allows the lower bits of seed to hopefully contain something useful
instead of just zeros!
This commit is contained in:
John Zaitseff 2011-07-20 23:19:12 +10:00
parent a9f52e89be
commit 1a44ff6513

View File

@ -270,7 +270,7 @@ void init_rand (void)
unsigned long int seed;
gettimeofday(&tv, NULL); // If this fails, tv is random enough!
seed = tv.tv_sec * tv.tv_usec;
seed = tv.tv_sec + tv.tv_usec;
srand48(seed);
}