Discussion:
|
Sometimes, we want to test the amount of time it takes for a procedure to complete, possibly to evaluate the effect of minor changes, vs a completely different approach, or just for our own satisfaction. This function takes one argument (the procedure name), and returns the time in seconds it takes to run. It should be noted, however, that any type of message box or input box can significantly skew results since they wait for user input. Also, to get a true picture of time, you should run the function a few times and average the results.
|