CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Timeout for a function

 



Omicron
Deleted

Jan 29, 2001, 4:02 AM

Post #1 of 2 (549 views)
Timeout for a function Can't Post

Is there any way to set a timeout for a function or for a special command ?
I want my script to cancel a function, if it takes to much time to do the job.
I can't use the ALRM Signal, because aktiv perl under win Nt doesn't support alarm... :-( (I don't want to use NT... I was compelled to do so.. ;-) )
Hope there's somebody who could help me, thx Omicron



cpdp
Deleted

Jan 29, 2001, 9:33 AM

Post #2 of 2 (543 views)
Re: Timeout for a function [In reply to] Can't Post

You could write a function that checks against the internal clock that you would call in your current function. Pass it the start time and the amount of time you want the function to quit. Then check against what it returns... Of course this will slow the program :(

Just a thought

~JpT~

http://toarmino.com
Custom Perl
Database Programming

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives