Option Strict On Public Module TimerFunction Public Sub Main() Dim starttime, endtime As Integer starttime = Environment.TickCount For ctr As Integer = 0 to 10000000 Next endtime = Environment.TickCount Console.WriteLine("Elapsed time is {0} milliseconds", endtime - starttime) End Sub End Module