]> Creatis software - FrontAlgorithms.git/blobdiff - appli/examples/example_Image_Dijkstra_EndPointDetection.cxx
Almost...
[FrontAlgorithms.git] / appli / examples / example_Image_Dijkstra_EndPointDetection.cxx
index 070a3e832daa6814e6ea84e1421067224e5f740d..47585ad30327975306210ad1eb51fe2a5cd912c8 100644 (file)
@@ -139,12 +139,13 @@ int main( int argc, char* argv[] )
   filter->ThrowEventsOn( );
 
   // Go!
-  std::clock_t start = std::clock( );
+  std::time_t start, end;
+  std::time( &start );
   filter->Update( );
-  std::clock_t end = std::clock( );
+  std::time( &end );
   std::cout
     << "Extraction time = "
-    << ( double( end - start ) / double( CLOCKS_PER_SEC ) )
+    << std::difftime( end, start )
     << " s." << std::endl;
 
   /* TODO
@@ -210,12 +211,13 @@ void DistanceMap(
   dmap->SquaredDistanceOn( );
   dmap->UseImageSpacingOn( );
 
-  std::clock_t start = std::clock( );
+  std::time_t start, end;
+  std::time( &start );
   dmap->Update( );
-  std::clock_t end = std::clock( );
+  std::time( &end );
   std::cout
     << "Distance map time = "
-    << ( double( end - start ) / double( CLOCKS_PER_SEC ) )
+    << std::difftime( end, start )
     << " s." << std::endl;
 
   output = dmap->GetOutput( );