March 2003
Intermediate to advanced
512 pages
14h 30m
English
Timer Function
Timer( )
A 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
Dim i, j
sStartTime = Timer()
For i = 1 To 100
Response.Write "Hello <BR>"
For j = 0 To 1000
Next
Next
Response.Write "Time Taken = " & _
FormatDateTime(Timer - sStartTime, vbShortTime) & _
" Seconds"
%>Read now
Unlock full access