From d4b77a7ea35b634406f500e703a0a972533e0aeb Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sun, 12 Nov 2006 22:45:33 +0000 Subject: [PATCH] randomly initialize seed --- Robust/src/Runtime/runtime.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.34.1