diff --git a/OpenPass_Source_Code/openPASS/CoreFramework/OpenPassSlave/importer/slaveConfigImporter.cpp b/OpenPass_Source_Code/openPASS/CoreFramework/OpenPassSlave/importer/slaveConfigImporter.cpp index 67e3308b3b713c371b229951716d97192d097a2c..f22f8fa175bb70f0a2c96411378ea49249bbc640 100644 --- a/OpenPass_Source_Code/openPASS/CoreFramework/OpenPassSlave/importer/slaveConfigImporter.cpp +++ b/OpenPass_Source_Code/openPASS/CoreFramework/OpenPassSlave/importer/slaveConfigImporter.cpp @@ -21,8 +21,12 @@ #include "CoreFramework/CoreShare/log.h" #include <stdio.h> #include <time.h> +#ifndef WIN32 #include <sys/time.h> #include <unistd.h> +#else +#include <windows.h> +#endif using namespace Importer; using namespace SimulationCommon; @@ -107,9 +111,13 @@ bool SlaveConfigImporter::ImportExperimentConfig(QDomElement experimentConfigEle } if(randomSeed==0) { +#ifdef WIN32 + randomSeed= GetTickCount(); +#else struct timeval tv; gettimeofday(&tv,NULL); randomSeed = (unsigned long)tv.tv_usec+getpid(); +#endif } experimentConfig.randomSeed = static_cast<std::uint32_t>(randomSeed);