clock() reports wrong times, use WallTime() instead

This commit is contained in:
Matthias Hochsteger 2019-09-26 16:13:43 +02:00
parent 9ba75145c0
commit 36ada6f90c

View File

@ -64,15 +64,15 @@ namespace netgen
(*testout) << "Error !!! " << ch << endl << flush; (*testout) << "Error !!! " << ch << endl << flush;
} }
static clock_t starttimea; static double starttimea;
void ResetTime () void ResetTime ()
{ {
starttimea = clock(); starttimea = WallTime();
} }
double GetTime () double GetTime ()
{ {
return double(clock() - starttimea) / CLOCKS_PER_SEC; return WallTime() - starttimea;
} }