VB Code:
Module Module1
Sub Main()
Console.WriteLine(OldOps())
Console.WriteLine(newOps)
Console.ReadLine()
End Sub
Private Function OldOps() As String
Dim i As Long
Dim tmp As Byte
Dim startTime As Date
startTime = Now()
For i = 1 To 500000000
tmp = tmp + 1
tmp = tmp - 1
Next
Return "OldOps took " & DateDiff(DateInterval.Second, startTime, Now).ToString & " seconds"
End Function
Private Function newOps() As String
Dim i As Long
Dim tmp As Byte
Dim startTime As Date
startTime = Now()
For i = 1 To 500000000
tmp += 1
tmp -= 1
Next
Return "NewOps took " & DateDiff(DateInterval.Second, startTime, Now).ToString & " seconds"
End Function
End Module