Octavian Rasnita wrote:
Hi,

I have tried to find out the time a perl program runs, and I have used:

#at the start of the program:
my $begin = (times)[0];
my $begin_t = time();

... The program follows

# at the end of the program:
my $end = (times)[0] - $begin;
my $end_t = time() - $begin_t;
print "end: $end\nEnd_t: $end_t\n";

After running the program, it prints:

end: 4.953
End_t: 19

Why does this difference appear?


The program is a very short one, for testing the speed of Storable module.

Thank you.

Teddy



This is a rather old post, but you might also look at a module I wrote a while ago, Time::Elapse on CPAN.

http://search.cpan.org/~sgodin/Time-Elapse-1.2402/

You may find it useful in the future.

--
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