If you want really fine granularity, try something like the Time-HiRes
module. As far as your other problem goes, you can set a timeout value in
the constructor of Net::FTP, as well as the read and write methods. If
that doesn't work, you could send yourself a signal to interrupt your
program if it hangs.

hth
charles


On Mon, 19 Mar 2001, Anthony E . Greene wrote:

> On Mon, 19 Mar 2001 23:41:33 Ted Hilts wrote:
> >This is my second perl problem.
> >
> >I have this ftp routine and want to be able to measure the time
> >associated with each step in the routine.  You can see a routine snippet
> >on the list where I submitted the first problem and it is called Perl
> >Problem.
> 
> set_chkpoint;
> ...FTP commands here
> print_time;
> 
> sub set_chkpoint {
>     $chkpoint = `date +%s`;
>     chomp($chkpoint);
> }
> 
> sub print_time {
>     $currtime = `date +%s`;
>     chomp($currtime);
>     $elasped_time = $currtime - $chkpoint;
>     print "Elasped time: $elasped_time\n";
> }



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to