VB.Net by API/System.Diagnostics/Stopwatch — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 16:40, 26 мая 2010
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