CodeMonkey
- 11
- 0
I'm using VS and coding in Java, C++ and C#. What are the methods to use to display the time it takes for the program to execute in ms?
The discussion centers around methods for calculating program execution time in various programming languages, specifically Java, C++, and C#. Participants explore different timing functions and tools available in different operating systems, as well as considerations for accuracy and overhead.
QueryPerformanceCounter() for high-resolution timing but notes it includes overhead from other tasks.GetProcessTimes(), suggesting it should exclude overhead from other processes but indicates it may still include interrupt overhead.time command can be used to measure execution time and references a related paper.Participants express various methods and tools for measuring execution time, but there is no consensus on the best approach or method, as different tools may have different overheads and applicability depending on the context.
Some methods discussed may have limitations related to overhead from other processes or interrupts, and the accuracy of timing may depend on the specific environment and implementation.