Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Execution time calculation in C (not Cpp)

Status
Not open for further replies.

dvtruongson

Member level 1
Joined
Oct 3, 2006
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,456
time calculation in c

Hi all,

Currently, I need to do a project which involved determining execution times of different algorithm. So, I want a code which can help to compute execution time of the codes.
Anyone has any ideas on this matter.

Your help is greatly appreciated.
Thank you very much
 

execution time in c

Check this Pseudo code...

function executiontime()
{
clock_t start;
clock_t diff;
clock_t end;

start= clock();
various algorithm;
end = clock();

diff = end - start;
print diff;

}
 

execution time c

Hi Vinseth, what header file I should input for clock() function? Can you give me more details...Thanks
 

time calculations c

For clock() and clock_t

you need

#include <time.h>
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top