Here is a fun program that not only shows how to get precise timings by using the time stamp counter, it also shows how to call main recursively. This is a C program. C++ will not allow calls to main.
http://www.codeproject.com/Tips/152288/Debugging-technique
ignore temp files