Here’s some simple code to time a process in VB .NET. This particular example is for an ASP .NET app (hence the “Response.Write”:
Dim ProcessStartTime As Date = Now
'CODE TO BE TIMED GOES HERE
Dim RunLength As System.TimeSpan = Now.Subtract(ProcessStartTime)
Dim Millisecs As Integer = RunLength.TotalMilliseconds
Response.Write("Process Time: " & Millisecs & " ms")