// Module : VISU
#include "VISU_ConvertorUtils.hxx"
+
#include <vtkUnstructuredGridWriter.h>
+#include <vtkTimerLog.h>
+
+#ifdef _DEBUG_
+static int MYDEBUG = 0;
+#else
+static int MYDEBUG = 0;
+#endif
-namespace VISU{
+namespace VISU
+{
void
WriteToFile(vtkUnstructuredGrid* theDataSet, const std::string& theFileName)
aWriter->Delete();
}
+
+ TTimerLog
+ ::TTimerLog(int theIsDebug,
+ const std::string& theName):
+ myIsDebug(MYDEBUG + theIsDebug),
+ myTimerLog(vtkTimerLog::New()),
+ myPrefixPrinter(myIsDebug == 1),
+ myName(theName)
+ {
+ myCPUTime = myTimerLog->GetCPUTime();
+ BEGMSG(myIsDebug > 1,"{\n");
+ }
+
+ TTimerLog
+ ::~TTimerLog()
+ {
+ myCPUTime = myTimerLog->GetCPUTime() - myCPUTime;
+
+ if(myIsDebug > 1){
+ BEGMSG(myIsDebug,"} = "<<myCPUTime<<" secs ("<<myName<<")\n");
+ }else{
+ BEGMSG(myIsDebug,myName<<" takes "<<myCPUTime<<" secs\n");
+ }
+
+ myTimerLog->Delete();
+ myTimerLog = NULL;
+ }
+
}