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

  • Context: C/C++ 
  • Thread starter Thread starter Lojzek
  • Start date Start date
Click For Summary
SUMMARY

This discussion focuses on measuring execution time in Dev-C++ using clock functions. Users can utilize the standard clock() function from the C library for second-level precision, while for higher precision measurements (milliseconds or microseconds), the rdtsc instruction is recommended, which can be integrated into C code with GCC support. Additionally, participants seek better resources for Dev-C++ documentation, as the built-in help lacks comprehensive function descriptions.

PREREQUISITES
  • Familiarity with C/C++ programming language
  • Understanding of time measurement concepts in programming
  • Knowledge of GCC compiler and its inline assembly capabilities
  • Basic navigation of online programming resources and documentation
NEXT STEPS
  • Research the clock() function in C for time measurement
  • Explore the use of rdtsc for high-precision timing in C/C++
  • Investigate alternative IDEs with better documentation for C/C++ programming
  • Learn about inline assembly in GCC for performance optimization
USEFUL FOR

C/C++ developers, performance analysts, and anyone seeking to enhance their programming efficiency in Dev-C++.

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).
 
Technology 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
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
69
Views
11K
  • · Replies 27 ·
Replies
27
Views
7K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 64 ·
3
Replies
64
Views
8K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K