Tuesday, December 16, 2014

How to calculate date difference in perl


var d = new Date();
               
$Start = time();
sleep 3;
$End = time();
$Diff = $End - $Start;

print "Start ".$Start."\n";
print "End ".$End."\n";
print "Diff ".$Diff."\n";