Warning: A non-numeric value encountered in /home/fixbyp5/public_html/wp-content/themes/Divi/functions.php on line 5752

In the past, I have used functions like GetTickCount to determine the amount of time a process takes. This has allowed me to benchmark the performance of my applications. Recently, however, I have started to use the built in Stopwatch object. This has proven to be more accurate and also gives me a measurement of time instead of some obscure number of system “clicks”. I have found a process that can take anywhere from 47 to 64 clicks, but always takes 60 milliseconds. Stopwatch is also fairly easy to use:

Dim sw as New Stopwatch()

'Do some code process here

Msgbox("Process finished in " + sw.ElapsedMilliseconds.ToString() + " ms")

That’s it.