better init for random number generator
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 23 Oct 2009 04:16:56 +0000 (21:16 -0700)
committerArun Persaud <arun@nubati.net>
Fri, 23 Oct 2009 04:16:56 +0000 (21:16 -0700)
backend.c

index acb9123..860a160 100755 (executable)
--- a/backend.c
+++ b/backend.c
@@ -607,7 +607,7 @@ InitBackEnd1()
     ShowThinkingEvent(); // [HGM] thinking: make sure post/nopost state is set according to options
 
     GetTimeMark(&programStartTime);
-    srandom(programStartTime.ms); // [HGM] book: makes sure random is unpredictabe to msec level
+    srandom((programStartTime.ms + 1000*programStartTime.sec)*0x1001001); // [HGM] book: makes sure random is unpredictabe to msec level
 
     ClearProgramStats();
     programStats.ok_to_send = 1;