mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
I'm sick of `--generate' giving the same answers if you run it twice
in one second. Switched the Unix get_random_seed() to using gettimeofday() rather than time(). [originally from svn r5837]
This commit is contained in:
8
gtk.c
8
gtk.c
@ -82,10 +82,10 @@ struct frontend {
|
|||||||
|
|
||||||
void get_random_seed(void **randseed, int *randseedsize)
|
void get_random_seed(void **randseed, int *randseedsize)
|
||||||
{
|
{
|
||||||
time_t *tp = snew(time_t);
|
struct timeval *tvp = snew(struct timeval);
|
||||||
time(tp);
|
gettimeofday(tvp, NULL);
|
||||||
*randseed = (void *)tp;
|
*randseed = (void *)tvp;
|
||||||
*randseedsize = sizeof(time_t);
|
*randseedsize = sizeof(struct timeval);
|
||||||
}
|
}
|
||||||
|
|
||||||
void frontend_default_colour(frontend *fe, float *output)
|
void frontend_default_colour(frontend *fe, float *output)
|
||||||
|
Reference in New Issue
Block a user