Time measurement example in Perl

If you want to check how long a Perl-Script takes you need to use Time:HiRes and you could use this example:

use strict;
use Time::HiRes qw(time);
# start
my $startime = time();
# run code
# print result
print $/."Time:".(time()-$startime)."s".$/;

And our Result in Seconds:


2 thoughts on “Time measurement example in Perl”

  1. Quality posts is the crucial to invite the visitors to go to see the web page, that’s what this web page is providing.

  2. This article presents clear idea in favor of the
    new users of blogging, that truly how to do blogging and

Leave a Reply

Your email address will not be published.

1 × 4 =