Hi,
If I want to calculate the elapsed-time of some operations, like sorting a array, which header should i use and which function should i use?
probably the first answer will help me to find the second answer myself. Please advise.
joey
Hi,
If I want to calculate the elapsed-time of some operations, like sorting a array, which header should i use and which function should i use?
probably the first answer will help me to find the second answer myself. Please advise.
joey
What operating system and compiler?
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
i use Visual C++ on Windows
look into QueryPerformanceCounter()
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
In C++, to calculate the elapsed time, we can use
CTime startTime = CTime::GetCurrentTime();
// ... perform time-consuming task ...
CTime endTime = CTime::GetCurrentTime();
CTimeSpan elapsedTime = endTime - startTime;
What is the method in C?
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi