how to 'sleep' in asp?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • flyingbear
    New Member
    • Sep 2007
    • 7

    how to 'sleep' in asp?

    how to 'sleep' in asp?

    I'm using an asp code to process data in database on server. It is a long time loop. What I want to do is: once after some processing, put the asp in 'sleep' for about 10 seconds (or some time), so that the server can process other things while processing my data.

    I found this code:

    /////////////////////
    StartTime = Timer()
    EndTime = Timer()

    WaitTime = EndTime - StartTime

    do while WaitTime < 10
    EndTime = Timer()
    WaitTime = EndTime - StartTime
    loop
    ///////////////////

    will this code satisfy what I need? or, it will still 'block' the server?

    I mean asp, not asp.net.

    any help is appreciated.


    thanks

    bear
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    The server will definitely pause with this script, I don't know if it will take up so much server resources that it would not be able to perform other tasks. Another option would be to go to a blank page with a javascript refresh after 10 seconds, that will redirect to the right page. Does this make sense?

    Jared

    Comment

    Working...