Skip to content
Snippets Groups Projects
Commit d1bf674d authored by Uwe Woessner's avatar Uwe Woessner
Browse files

windows compile fix


Signed-off-by: default avatarhpcwoess <woessner@hlrs.de>
parent 05cf7ec5
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment