Using this tool, I simply paste my two different algorithms into the existing loops, and it takes care of the details for me. Then, it calculates the time required for each algorithm. The middle time minus the start time is the interval for the first algorithm, and the end time minus the middle time is the time required for the second. Finally, it displays the results for me to see. When it has finished testing the two algorithms, I have the option to re-run the test so I can compare the results of many trials.
Unexpected things can cause erroneous results.
For instance, if my e-mail system checks for messages while one of the tests is running, this tool will record an artificially high value for that test. The particular version I'm presenting here conducts tests of two different algorithms for determining the number of days in a particular month. More on that later. Obviously, you would want to run these time trials on a machine that will not have unexpected interruptions. Then, of course, you have to remember to turn them all back on when you're through.