このページに関してのお問い合わせはこちら
【Perl 】初心者コーナーPart5
ツイート
754
:
名無しさん@お腹いっぱい。
:
2001/07/05(木) 15:02 ID:???
#!/usr/bin/perl
use Benchmark;
#1
$t1 = new Benchmark;
code;
$t2 = new Benchmark;
print "the code took:", $t2->timediff($t1)->timestr, "\n";
#2
$count = 10000;
timethese( $count, {
foo => sub{ code1 },
bar => sub{ code2 },
});
__END__