]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/ProcessObject.cxx
...
[cpPlugins.git] / lib / cpPlugins / ProcessObject.cxx
index d93fd18dc5a358c2358feca50cc0277ca3594f0b..136b45cd3f6a734529b72dacf40525aa251fd74b 100644 (file)
@@ -1,6 +1,7 @@
 #include <cpPlugins/ProcessObject.h>
 #include <cpPlugins/ParametersQtDialog.h>
 #include <itkProcessObject.h>
+#include <chrono>
 
 // -------------------------------------------------------------------------
 cpPlugins::Parameters* cpPlugins::ProcessObject::
@@ -235,8 +236,22 @@ Update( )
   {
     if( this->m_LastExecutionTime < this->GetMTime( ) || need_to_update )
     {
+      std::cout
+        << "cpPlugins: Updating \""
+        << this->GetClassName( ) << ":" << this->GetClassCategory( )
+        << "\"... ";
+      std::cout.flush( );
+      long start =
+        std::chrono::duration_cast< std::chrono::milliseconds >(
+          std::chrono::system_clock::now( ).time_since_epoch( )
+          ).count( );
       r = this->_GenerateData( );
+      long end =
+        std::chrono::duration_cast< std::chrono::milliseconds >(
+          std::chrono::system_clock::now( ).time_since_epoch( )
+          ).count( );
       this->m_LastExecutionTime = this->GetMTime( );
+      std::cout << "done in " << ( ( end - start ) / 1000 ) << "ms!" << std::endl;
 
     } // fi