codemeter - measuring the execution time of a piece of code
Call:
double dvalue = codemeter(int what);
Here what is 0 or 1.
If 0 is set, then the timer is reset.
If 1 is specified, then the function returns the time in seconds since the counter was reset to zero.
If 2 is given, then the function returns the time in milliseconds.
Example.
Determine the cycle time for 10,000 passes.
codemeter(0);
int i;
for(i=0;i<10000;i++)
{
cout << i << "\n";
}
cout<< "Loop in 10 000 times completed by " << codemeter(1) << " seconds";