<%
Response.Buffer = true
Function WaitFor(SecDelay,ShowMsg)
timeStart = Timer()
timeEnd = timeStart + SecDelay
Msg = "Timer started at " & timeStart & "<br>"
Msg = Msg & "Script will continue in "
i = SecDelay
Do While timeStart < timeEnd
If i = Int(timeEnd) - Int(timeStart) Then
Msg = Msg & i
If i <> 0 Then Msg = Msg & ", "
If ShowMsg = 1 Then Response.Write Msg
%>
<% Response.Flush() %>
<%
Msg = ""
i = i - 1
End if
timeStart = Timer()
Loop
Msg = "...<br>Slept for " & SecDelay & " seconds (" & _
Timer() & ")"
If ShowMsg = 1 Then Response.Write Msg
End Function
Call WaitFor(5,0)
Call WaitFor(3,1)
%>
最新评论