Welcome to the Monastery | |
PerlMonks |
Re: Win32: timing out a perl subroutineby Brovnik (Hermit) |
on Jun 19, 2001 at 19:18 UTC ( [id://89662]=note: print w/replies, xml ) | Need Help?? |
You can implement your own non pre-emptive timer fairly easily :
Of course, being non-preemptive, this doesn't guarantee you'll get control back within a certain time, if the loop iteration takes to long, or the process blocks (e.g. waiting for user input). Also assumes that other functions like alarm() aren't implemented, since these would be more robust, but the above is lightweight and may do what you need.
Update: I meant nonpre-emptive.
In Section
Seekers of Perl Wisdom
|
|