i have to find two time stamps one at the begining of main and at the end of main and take the difference to find the time elapsed to execute the code in between.Can anybody suggest the programs or proper API s in Linux.
shanthu123
0
Newbie Poster
Recommended Answers
Jump to Post>Can anybody suggest the programs or proper API s in Linux.
A profiler would be best. Check your system for the existence of gprof. You can also use a number of methods inside of your code to get execution time and timestamps, something like gettimeofday or rdtsc.
Jump to Postman time
time does what u want.
All 5 Replies
Narue
5,707
Bad Cop
Team Colleague
youngstorm
0
Light Poster
iamthwee
aasi007onfire
0
Newbie Poster
thekashyap
193
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.