On Jan 27, 2004, at 6:50 PM, [EMAIL PROTECTED] wrote:

Hi all:

Howdy.


I'm trying to determine how long an system operation takes. Anyone know
of a simple way to do this ?

You were on the right track. Try this:


my $start = time;

# do something to time here

my $time_taken = time - $start;

If you want more information on the time() subroutine, try (at the commandline):

perldoc -f time

And if you get into timing things it won't be long before you want the Benchmarking module, generally. You can read about it too:

perldoc Benchmark

Hope that helps.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to