Public Class Tester
Public Shared Sub Main
Dim lastTicks As Long
Dim numTicks As Long
Dim endTime As Date
Dim results As String
endTime = Now.AddSeconds(1)
Do
If (Now.Ticks <> lastTicks) Then
numTicks += 1
lastTicks = Now.Ticks
End If
Loop Until (Now > endTime)
results = "Now.Ticks: " & Now.Ticks.ToString & vbNewLine & _
"Number of updates per second: " & numTicks.ToString
Console.WriteLine(results)
End Sub
End Class
|