How to effectively measure difference in a run-time.

Posted by Knowing me knowing you on Stack Overflow See other posts from Stack Overflow or by Knowing me knowing you
Published on 2010-04-10T18:23:52Z Indexed on 2010/04/10 18:33 UTC
Read the original article Hit count: 192

Filed under:
|

Guys, in one of the excersises in TC++PL B.S. asks to:
"Write a function that either returns a value or that throws that value based on an argument. Measure the difference in run-time between the two ways."
Great pity he never explaines how to measure such things. I'm not sure if I'm suppose to write simple "time start, time end" counter or maybe there are more effective and practical ways to do it?
Thanks in advance.

© Stack Overflow or respective owner

Related posts about c++

Related posts about Performance