]> Creatis software - creaMaracasVisu.git/commitdiff
Clean code
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 20 Dec 2024 11:56:49 +0000 (12:56 +0100)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 20 Dec 2024 11:56:49 +0000 (12:56 +0100)
bbtk/src/bbcreaMaracasVisuSetPosition.cxx

index 3420501124d3401ee1c79c9f2019bb054958c526..a783320693bfcf51955082138fcdd8d782603136 100644 (file)
@@ -18,8 +18,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(SetPosition,bbtk::AtomicBlackBox);
 //===== 
 void SetPosition::Process()
 {
-auto start = std::chrono::high_resolution_clock::now();
-
 // THE MAIN PROCESSING METHOD BODY
 //   Here we simply set the input 'In' value to the output 'Out'
 //   And print out the output value
@@ -57,17 +55,16 @@ auto start = std::chrono::high_resolution_clock::now();
        #if wxMAJOR_VERSION <= 2
                                bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
        #else
+auto start = std::chrono::high_resolution_clock::now();
                                bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
-       #endif          
+auto stop       = std::chrono::high_resolution_clock::now();
+auto duration   = std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
+printf("EED SetPosition::Process time= %ld  %s \n", duration.count() , bbGetFullName().c_str() );
+       #endif
                 vtkmprbasedata->SetFixAxis2D( tmpFixAxis );
                        } // if bbGetInputPosition
                } // bbGetInputwxVtkBaseView    
        } // Active
-    
-auto stop       = std::chrono::high_resolution_clock::now();
-auto duration   = std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
-printf("EED SetPosition::Process time= %ld  %s \n", duration.count() , bbGetFullName().c_str() );
-
 }
 
 //=====