> But I want the result to be millisecond not only be second. thanks. > > On Mon, Jun 1, 2009 at 5:01 PM, Raymond Wan <[email protected]> wrote: >> >> Hi Jenn, >> >> >> [email protected] wrote: >>> >>> What's the standard way to calculate a subroute's executed time in >>> Perl? >>> Thanks in advance. >> >> >> I don't know what's the standard way, but I use the times function >> and get >> the user time before and after the subroutine and then subtract. >> >> http://perldoc.perl.org/functions/times.html
For millisecond resolution see DateTime::HiRes (Create DateTime objects with sub-second current time resolution) http://search.cpan.org/~jhoblitt/DateTime-HiRes-0.01/lib/DateTime/HiRes.pod -- Owen -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
