#include <cpPlugins/ProcessObject.h>
#include <cpPlugins/ParametersQtDialog.h>
#include <itkProcessObject.h>
-#include <chrono>
// -------------------------------------------------------------------------
cpPlugins::Parameters* cpPlugins::ProcessObject::
<< 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( );
+ this->m_LastExecutionSpan = cpPlugins_CHRONO;
r = this->_GenerateData( );
- long end =
- std::chrono::duration_cast< std::chrono::milliseconds >(
- std::chrono::system_clock::now( ).time_since_epoch( )
- ).count( );
+ this->m_LastExecutionSpan = cpPlugins_CHRONO - this->m_LastExecutionSpan;
this->m_LastExecutionTime = this->GetMTime( );
- std::cout << "done in " << ( ( end - start ) / 1000 ) << "s!" << std::endl;
+ std::cout << "done in " << ( double( this->m_LastExecutionSpan ) / double( 1000 ) ) << "s!" << std::endl;
} // fi
* =========================================================================
*/
+#include <chrono>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
+// -------------------------------------------------------------------------
#ifdef cpPlugins_SYS_WINDOWS
# define cpPlugins_STRTOK( A, B, N ) strtok_s( A, B, N )
#else // cpPlugins_SYS_WINDOWS
# define cpPlugins_STRTOK( A, B, N ) std::strtok( A, B )
#endif // cpPlugins_SYS_WINDOWS
+// -------------------------------------------------------------------------
+#define cpPlugins_CHRONO \
+ std::chrono::duration_cast< std::chrono::milliseconds >( \
+ std::chrono::system_clock::now( ).time_since_epoch( ) \
+ ).count( )
+
namespace cpPlugins
{
struct IsSeparator