more accurate time measurement for operator creation
Signed-off-by: Thorsten Liebig <thorsten.liebig@gmx.de>pull/1/head
parent
90673c4be9
commit
1bd404fb9c
|
@ -147,7 +147,9 @@ int openEMS::SetupFDTD(const char* file)
|
||||||
Reset();
|
Reset();
|
||||||
int bounds[6];
|
int bounds[6];
|
||||||
|
|
||||||
time_t startTime=time(NULL);
|
timeval startTime;
|
||||||
|
gettimeofday(&startTime,NULL);
|
||||||
|
|
||||||
|
|
||||||
TiXmlDocument doc(file);
|
TiXmlDocument doc(file);
|
||||||
if (!doc.LoadFile())
|
if (!doc.LoadFile())
|
||||||
|
@ -277,11 +279,12 @@ int openEMS::SetupFDTD(const char* file)
|
||||||
if (m_debugPEC)
|
if (m_debugPEC)
|
||||||
FDTD_Op->DumpPEC2File("PEC_dump.vtk");
|
FDTD_Op->DumpPEC2File("PEC_dump.vtk");
|
||||||
|
|
||||||
time_t OpDoneTime=time(NULL);
|
timeval OpDoneTime;
|
||||||
|
gettimeofday(&OpDoneTime,NULL);
|
||||||
|
|
||||||
FDTD_Op->ShowStat();
|
FDTD_Op->ShowStat();
|
||||||
|
|
||||||
cout << "Creation time for operator: " << difftime(OpDoneTime,startTime) << " s" << endl;
|
cout << "Creation time for operator: " << CalcDiffTime(OpDoneTime,startTime) << " s" << endl;
|
||||||
|
|
||||||
//create FDTD engine
|
//create FDTD engine
|
||||||
FDTD_Eng = FDTD_Op->CreateEngine();
|
FDTD_Eng = FDTD_Op->CreateEngine();
|
||||||
|
|
Loading…
Reference in New Issue