How long does it take to execute some code?

 

use Time::HiRes qw( time );
my $start = time();

// Code goes here

sleep 10;

my $end = time();
print “SPRINTF: “; printf(“%.6f\n”, $end – $start);

 

 

 

podtech
podtech