I am trying to measure the execution time of a code block in C. I have something like this in my code:
clock_t begin, end;
double time_spent;
begin = clock();
ATL_dsymv(122,n,alfa,A,n,X,1,beta,Y,1);
end = clock();
time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
printf ("(%f seconds)",time_spent);
But it always returns: (0.000000 seconds). I tried the same thing on simpler code blocks like for's but it has the same result. What am I doing wrong? Thanks a lot.