Re: Timeout implementation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Lopamudra-

Private Sub Sample()
Dim t As Date

t = Time
Do
'//process
Loop Until DateDiff("s", t, Time) >= 10

MsgBox "Finished"
End Sub

Whenever DateDiff("s", t, Time) >= TimeOut then do something

<Harvey Triana/>


"Lopamudra" <Lopamudra@xxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el mensaje
news:9185BC98-7E63-42DA-A2CD-7E8630A04987@xxxxxxxxxxxxxxxx
Hi,

I am calling a procedure in my form which should return within 10 seconds.
If the procedure takes more time than 10 seconds, the calling function
should
stop the execution of the procedure and unload the form.

I implemented a timer but that didnt work. Nor did the Sleep function.
Please advice.

Also, my form in production will remain hidden. So will the solution you
will give work in that scenraio (I will need the solution anyway).

Regards
Lopa


.



Relevant Pages

  • Re: Is there such a thing as an invalid thread id?
    ... I am looking to let the calling function ... The attr argument specifies thread attributes to be applied to the new thread. ... EAGAIN not enough system resources to create a process for the new thread. ...
    (comp.os.linux.development.apps)
  • Re: using my own malloc()
    ... presume to know what the caller wants to do with the error. ... even calling fprintf could be undesirable. ... Your wrapper function checks for ... calling function doesn't also check, ...
    (comp.lang.c)
  • Re: slightly OT: error handling conventions
    ... > trivially set it to NULL after calling free on it. ... , accessing a pointer after ... I'd say that the calling function MUST NOT make any assumptions about ...
    (comp.lang.c)
  • Re: String Literals
    ... From what I know the calling function will only retrieve the character ... int main { ... and is not visible to the calling procedure. ...
    (comp.lang.c)
  • Re: Rodents
    ... calling him Harvey ... Even you must know that film! ... Ellie ...
    (uk.education.staffroom)