I have a function which is downloads a web page for something, which can sometimes take a long time. I would like to be able to time the function, and when it goes past the time limit it would stop it. What I was thinking of doing was setting a timer and when the timer went off, it would stop the function. My question is, how would I stop the function? Or is there a better way? Thanks.