Commit d1bf674d authored by Uwe Woessner's avatar Uwe Woessner
Browse files

windows compile fix


Signed-off-by: Uwe Woessner's avatarhpcwoess <woessner@hlrs.de>
parent 05cf7ec5
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment