Perl already keeps track of start time for you in $^T, so unless you're doing something really funky, you can just subtract that from the current time to get elapsed time.
END { my $elapsed_seconds = time - $^T; # Do something with $elapsed_seconds # e.g., print qq(<!-- Script took ${elapsed_seconds}s to run -->); }
--k.
In reply to Re^2: calculate the time taken to run a script
by Kanji
in thread calculate the time taken to run a script
by rsennat
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |