How to set the time for particular funtion?

P

paresh

Hi,

Could any one tell me how to set the particular time for my function either
using Timer(not sure if it works only in Form) or Thread or any other method?
I want to kill that function if id doesn't return in specific time say 1
minute.

Thanks.
 
K

Ken Slovak - [MVP - Outlook]

Without knowing how that function is written or what language you're using
it's rather difficult to know what to recommend.

In general, if you are using VBA or VB you are using a single threaded
environment and you are best off writing your function, whatever it is, to
handle the timing for you. That means a loop, possibly with a limit counter
or a Sleep statement that when exceeded leads to a code fork that exits the
function.

However, that's general and not specific since no one but you knows what
your function is or how it's constricted or what it's trying to do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top