VB.Net by API/System.Diagnostics/Stopwatch
Stopwatch.Elapsed
<source lang="vbnet"> Public Class Tester
Public Shared Sub Main Dim testWatch As New System.Diagnostics.Stopwatch Dim results As String testWatch.Start() MsgBox("Press OK to see elapsed seconds") results = String.Format( _ "testWatch.Elapsed.Seconds: {0}{3}" & _ "testWatch.Elapsed.TotalSeconds: {1}{3}" & _ "testWatch.ElapsedMilliseconds / 1000: {2}", _ testWatch.Elapsed.Seconds, _ testWatch.Elapsed.TotalSeconds, _ testWatch.ElapsedMilliseconds / 1000, vbNewLine) Console.WriteLine(results) End Sub
End Class
</source>