Use a StopWatch. A quick example.
Dim stpw As New Stopwatch
'code to time
stpw.Restart()
For x As Integer = 1 To 1000000
Dim i As Integer = x
Next
'timing done
stpw.Stop()
Debug.WriteLine(stpw.Elapsed)