May 1995
Beginner
508 pages
16h 14m
English
Timer Function
Timer( )
A Variant of subtype Single.
Returns the number of seconds since midnight.
You can use the Timer function as an easy method
of passing a seed number to the Randomize
statement, as follows:
Randomize Timer
The Timer function is ideal for measuring the
time taken to execute a procedure or program statement, as the
following ASP snippet shows:
Dim sStartTime As Single
Dim i As Integer
sStartTime = Timer
For i = 1 To 100
Response.Write "Hello" & "<P>"
Next i
Response.Write "Time Taken = " & Timer - sStartTime & " Seconds"Read now
Unlock full access