Time a function or Procedure in Milliseconds

Sometimes there is a need to evaluate how fast ( or slow ) as certain function, procedure takes to complete. This will help in identify where bottle necks are occurring in your procedures.


Dim starttime As DateTime = Now
Dim mset As New clsLoadSettings(clsLoadSettings.SettingsFiletype.XML)
mset.GetSettings()
mset.Dispose()
Debug.Print("Settings Load Time: " & Now.Subtract(starttime).TotalMilliseconds.ToString)