jtownsen wrote:
I have some scripts that use "system" to drive a command line test harness. Each time I call system, I'd like to know how long the execution took. Is there a way to time the fork that is created when I call system?


Untested:


use Time::HiRes;
use warnings;

my $t0 = Time::HiRes::time();
system("some_command");
my $t1 = Time::HiRes::time();

print "Took ", $t1 - $t0, " seconds\n";

Cheers,
Rob


--
Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to