Measure a function’s performance

Imports System.Diagnostics

[vb]

Dim sw As New Stopwatch()
sw.Start()
‘ Do the work here
sw.Stop()
Console.WriteLine("Elapsed time: {0}", sw.Elapsed.TotalMilliseconds)

[/vb]

Comments are closed.