Hi All
some times we are required to control the time execution of the child sub program. This can be achieved use the Time::HiRes
I have added the code snippet. Here I have line the main program (line 9 ) to sleep for 30 sec.
But setup alarm timeout to 3 sec (line 4) and trigger timeout after 3 sec and setup local variable $SIG{ALRM} to time out/
some times we are required to control the time execution of the child sub program. This can be achieved use the Time::HiRes
I have added the code snippet. Here I have line the main program (line 9 ) to sleep for 30 sec.
But setup alarm timeout to 3 sec (line 4) and trigger timeout after 3 sec and setup local variable $SIG{ALRM} to time out/
No comments:
Post a Comment