Stopwatch.Elapsed : Stopwatch « System.Diagnostics « VB.Net by API






Stopwatch.Elapsed

  

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

   
    
  








Related examples in the same category