[MOAB-dev] r4865 - MOAB/trunk/src/io

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue May 24 11:57:16 CDT 2011


Author: kraftche
Date: 2011-05-24 11:57:15 -0500 (Tue, 24 May 2011)
New Revision: 4865

Modified:
   MOAB/trunk/src/io/WriteHDF5.cpp
Log:
move utiltiy class into moab namespace

Modified: MOAB/trunk/src/io/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/WriteHDF5.cpp	2011-05-24 16:54:31 UTC (rev 4864)
+++ MOAB/trunk/src/io/WriteHDF5.cpp	2011-05-24 16:57:15 UTC (rev 4865)
@@ -59,15 +59,6 @@
 #define RUNTIME (clock()/(double)CLOCKS_PER_SEC)
 #endif
 
-class CpuTimer {
-private:
-  double atBirth, atLast;
-public:
-  CpuTimer() : atBirth(RUNTIME), atLast(atBirth) {}
-  double since_birth() { return (atLast = RUNTIME) - atBirth; };
-  double elapsed() { double tmp = atLast; return (atLast = RUNTIME) - tmp; }
-};
-
 /* Access HDF5 file handle for debugging
 #include <H5Fpublic.h>
 struct file { uint32_t magic; hid_t handle; };
@@ -109,6 +100,15 @@
 
 namespace moab {
 
+class CpuTimer {
+private:
+  double atBirth, atLast;
+public:
+  CpuTimer() : atBirth(RUNTIME), atLast(atBirth) {}
+  double since_birth() { return (atLast = RUNTIME) - atBirth; };
+  double elapsed() { double tmp = atLast; return (atLast = RUNTIME) - tmp; }
+};
+
 template <typename T> inline 
 void VALGRIND_MAKE_VEC_UNDEFINED( std::vector<T>& v ) {
     VALGRIND_MAKE_MEM_UNDEFINED( &v[0], v.size() * sizeof(T) );

















More information about the moab-dev mailing list