ITK  4.8.0
Insight Segmentation and Registration Toolkit
SphinxExamples/src/Core/Common/ComputeTimeBetweenPoints/Code.cxx
#include "itkTimeProbe.h"
#include <iostream>
#include <string>
void LongFunction()
{
for(int i = 0; i < itk::NumericTraits< int >::max() / 100; i++)
{
double a = 0;
(void)a;
}
}
int main(int, char *[])
{
clock.Start();
LongFunction();
clock.Stop();
std::cout << "Mean: " << clock.GetMean() << std::endl;
std::cout << "Total: " << clock.GetTotal() << std::endl;
clock.Start();
LongFunction();
clock.Stop();
std::cout << "Mean: " << clock.GetMean() << std::endl;
std::cout << "Total: " << clock.GetTotal() << std::endl;
return EXIT_SUCCESS;
}