Help for Dev-C++: Find a Clock & Good Assistance

  • Context: C/C++ 
  • Thread starter Thread starter Lojzek
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 5K views
Lojzek
Messages
246
Reaction score
1
I use Dev-C++ and I would like to measure time needed to perform calculation.
Is there some sort of clock function is this program?

I would also like to find a good help for Dev-C++. Does anyone know where to get it?
(the help in my program isn't very good: it does not even contain description of all functions).
 
Physics news on Phys.org
I don't koow what precision do you care. for seconds, you could use clock function see:
http://www.cplusplus.com/reference/clibrary/ctime/time.html

but for more precise, such as one ms or one us, you could use "rdtsc" instructions, the gcc may support this inline instruction in your c code.

see : http://www.geocities.com/izenkov/howto-rdtsc.htm