Forum Discussion

khanasmat_cse's avatar
khanasmat_cse
New Contributor
13 years ago

Is there any way to wait for certain time to perform an action .

Hi All ,



I want to perform an action .But if the action takes a long time , i want to restart my app .

Currently the action takes a long time and execution gets stuck there only untill i restart my App .So i want to give certain time for the process or Restart app .



Any Help ,sugesstions is welcomed .



Regards ,

Asmat

3 Replies

  • sastowe's avatar
    sastowe
    Super Contributor
    Well to wait, you have some choices. The most straight forward is aqUtills.Delay... But one thing I have done in the past to wait to see if a state changes is



    Do While True



        If <whatever state indicates I can stop waiting> then

            Log.Message ... whatwever I might want to sya

            Exit Do '' restart here maybe?

        else

            aqUtils.Delay 3000, "Waiting to test state again"

        end if



    Loop





    For info on rebooting try reading about



    http://support.smartbear.com/viewarticle/30885/
  • hlalumiere's avatar
    hlalumiere
    Regular Contributor
    From what you ask what you need is a timeout not a delay. What kind of action are you doing?