fixed: have to use omp_get_wtime() to get a correct wall clock

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1422 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
akva
2012-01-19 08:53:33 +00:00
committed by Knut Morten Okstad
parent adc65bc8ee
commit 5ad7f3afda

View File

@@ -19,6 +19,10 @@
#include "LinAlgInit.h"
#ifdef USE_OPENMP
#include <omp.h>
#endif
Profiler* utl::profiler = 0;
@@ -48,6 +52,9 @@ Profiler::~Profiler ()
static double WallTime ()
{
#ifdef USE_OPENMP
return omp_get_wtime();
#endif
timeval tmpTime;
gettimeofday(&tmpTime,NULL);
return tmpTime.tv_sec + tmpTime.tv_usec/1.0e6;