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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user