Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loop timeout

Status
Not open for further replies.

Bob2

Programmer
Jul 3, 2000
228
SE
Hi


I try to use this loop to delay a page 5 seconds but I get a time out when I use this loop, what am I doing wrong here?

<%
CurrentSecond = Second(Time)
FutureSecond = (CurrentSecond + 5)

Do Until CurrentSecond = FutureSecond
CurrentSecond = Second(Time)
Response.Write CurrentSecond
Loop
%>

Regards

M
 
Highly server intensive to do this....I tend to use a sleep COM object...much simpler and cleaner


Bastien

Cat, the other other white meat
 
Bastien



What is that? Could you give me links or maybe some examples?


Regards


M
 
Since vbs has no sleep function, I wrote a com object to expose that functionality

Here is the code to instantiate that
Code:
Sub GetSleep
' set a 60 timeout to wait for the report to be created and read 
  Set oSleep = CreateObject("sleeper.sleeps")
  oSleep.gotoSleep (30000)
  set oSleep = nothing
End Sub

and the code to create the com object is
Code:
Private Declare Sub Sleep Lib "kernel32" _
    (ByVal dwMilliseconds As Long)

Public Sub DoSleep(intMiliSeconds As Integer)
  Sleep (intMiliSeconds)
End Sub
Create the above VB code as an activex dll file and register it on the server with REGSVR32 [name of file].dll and then use the top ASP code to instantiate the object


Bastien

Cat, the other other white meat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top