Double representing the number of seconds that have elapsed since midnight
Returns the number of seconds since midnight
Timer is classified as a function in VB 6 and as a read-only property in VB.NET.
You can use the Timer property as an easy method of passing a seed number to the Randomize procedure, as follows:
Randomize Timer( )
The Timer property is ideal for measuring the time taken to execute a procedure or program statement, as the following snippet shows:
Dim sStartTime As Single Dim i As Integer sStartTime = Timer( ) For i = 1 To 100 Console.WriteLine("Hello") Next i MsgBox("Time Taken = " & Timer( ) - sStartTime & " Seconds")
While the Timer property returns a Double in VB.NET, the VB 6 Timer function returns a Single.