Hello,
I need to use the clock() function from time.h header, to capture values of time that an neural network, MLP, takes to training, but when the program run, the output of values of times is even 0.00s. I want to know if has a especial way to use this function (like change the const CLOCKS_PER_SEC) , or if have a way to create a data of times using the Profile's Clock form CCS v3.1, to plot after using that.
I'm posting the way that i'm using the clock() on my code:
#include <stdio.h>
#include <time.h>
int main()
{
float time;
int i;
clock_t start, end;
start = clock();
for(i=0; i<100000; i++) {}
end = clock();
time = (float) (end-start)/CLOCKS_PER_SEC;
printf("time = %.2f\n", time);
return 0;
}
Thanks,