Running time

R

Rajeev

I want to calculate the running time of my program, which runs for a
long time(~ a day). This is what I am doing in my code:


#include <time.h>
clock_t tend, tstart;
tstart = clock();

\* Body of Code *\

tend = clock();
Running Time = ((double) (tend - tstart) / (double) CLOCKS_PER_SEC));

But for my codes which run for a long time, I am not getting the right
value for the running time variable. Please help me out!!

Thanks
Rajeev.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top