hi
Could anyone tell me how do i measure the time taken by a part of my code(in seconds)
I want to check the amount of time taken to call a function 1000 times
Thanks
Gautam
Printable View
hi
Could anyone tell me how do i measure the time taken by a part of my code(in seconds)
I want to check the amount of time taken to call a function 1000 times
Thanks
Gautam
If you have a C language book, you may want to look into the "time.h" header. :) There is a function there called clock() which is used to time C code and other processes.
I have read a sample C code-timing in my book but I wasn't able to memorize the actual implementation. :D
Use a 'profiler'. Your compiler might support this option. Better compilers do.