I found this code here. If I divide (t2-t1)/CLOCK_PER_SEC
will i get time in seconds? How to I find CLOCK_PER_SEC? Is there any better way to find the execution time of a code or a function?
#include<time.h>
main()
{
clock_t t1=clock();
// Your code that takes more than 1 sec;
clock_t t2=clock();
printf("The time taken is.. %g ", (t2-t1));
..