Thread Sleep in Classic ASP?

there is also a good hta hack that should work. Look for the A Synthetic Sleep Function here: http://www.mvps.org/scripting/rube/index.htm


This routine waits any amount of time, and doesn't use CPU:

Function asp_Wait(nMilliseconds)
  Dim oShell
  '' VBS: Set oShell= Wscript.CreateObject("WScript.Shell")
  '' ASP:
  Set oShell= Server.CreateObject("WScript.Shell")
  Call oShell.run("ping 1.1.1.1 -n 1 -w " & nMilliseconds,1,TRUE) 
  '' Option TRUE: Wait until ping is complete
  '' 1000 milli-second wait is 1 second
End Function

You can use :

<html>
<head>
    <title>Sleep</title>
</head>
<body>
    <% 

        function Sleep(seconds)
            set oShell = CreateObject("Wscript.Shell")
            cmd = "%COMSPEC% /c timeout " & seconds & " /nobreak"
            oShell.Run cmd,0,1
        End function

        Sleep(5)

        response.write("End") 
    %>
</body>
</html>