Imports System
Imports System.Diagnostics
Imports System.Threading
Class Program
Private Shared Sub testSpeed(ByVal ms As Integer)
Dim stopwatch As Stopwatch = New Stopwatch()
stopwatch.Start()
For i As Integer = 0 To 1000 - 1
Thread.Sleep(ms)
Next
stopwatch.[Stop]()
Console.WriteLine($"Executed in {stopwatch.ElapsedMilliseconds} ms")
End Sub
Public Shared Sub Main()
testSpeed(1)
End Sub
End Class
' run:
'
' Executed in 1068 ms
'