Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to measure execution time?

Status
Not open for further replies.

JackMorris

Technical User
Jan 30, 2003
18
0
0
IE
Hi,

Does anybody has an idea on how to measure the execution time in Visual C++6.0?

thanx in advance
Jack
 
Code:
// At some point, get the Tick Count
DWORD tickAtStart = GetTickCount();
...
// Do your stuff
...
// At some other point get the change of Tick Count
DWORD elapsedTicks = GetTickCount() - tickAtStart;

// elapsedTicks holds the number of milliseconds since tickAtStart was set.

/Per
[sub]
if (typos) cout << &quot;My fingers are faster than my brain. Sorry for the typos.&quot;;
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top