From: bdemsky Date: Sun, 12 Nov 2006 22:45:33 +0000 (+0000) Subject: randomly initialize seed X-Git-Tag: preEdgeChange~748 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d4b77a7ea35b634406f500e703a0a972533e0aeb;p=IRC.git randomly initialize seed --- diff --git a/Robust/src/Runtime/runtime.c b/Robust/src/Runtime/runtime.c index 8a0ecbac..0a804eba 100644 --- a/Robust/src/Runtime/runtime.c +++ b/Robust/src/Runtime/runtime.c @@ -72,7 +72,6 @@ void processOptions() { if (options==NULL) break; - sscanf(options, "%f", &instfailurechance); options=strchr(options,' '); if (options!=NULL) options++; @@ -94,6 +93,11 @@ void processOptions() { if (options!=NULL) options++; debugtask=1; printf("Debug task option on.\n"); + } else if (strncmp(options, "-initializerandom", sizeof("-initializerandom")-1)==0) { + options=strchr(options,' '); + if (options!=NULL) options++; + printf("Initializing random number generator.\n"); + srandomdev(); } else break; }