From 694fa08125f7fb88594212853a893614cfcaaedb Mon Sep 17 00:00:00 2001 From: Eric Heien Date: Mon, 1 Jul 2002 19:30:58 +0000 Subject: [PATCH] Added random WU generator. svn path=/trunk/boinc/; revision=146 --- tools/create_work.C | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/create_work.C b/tools/create_work.C index 6cdb0f805d..39193b005d 100644 --- a/tools/create_work.C +++ b/tools/create_work.C @@ -40,6 +40,7 @@ #include #include #include +#include #include "db.h" #include "backend_lib.h" @@ -55,6 +56,7 @@ int main(int argc, char** argv) { int i, ninfiles, nresults; char* boinc_download_dir = getenv("BOINC_DOWNLOAD_DIR"); + srand(time(NULL)); if (!boinc_download_dir) { printf("must define BOINC_DOWNLOAD_DIR"); exit(1); @@ -100,6 +102,9 @@ int main(int argc, char** argv) { } else if (!strcmp(argv[i], "-rsc_disk")) { i++; wu.rsc_disk = atof(argv[i]); + } else if (!strcmp(argv[i], "-wu_name_rand")) { + i++; + sprintf(wu.name, "%s_%d", argv[i], rand()); } else { infiles = argv+i; ninfiles = argc - i;