#keywords Perl, 시간 측정 {{{#!gcode #!/usr/bin/perl use Time::HiRes; my $startTime = [ Time::HiRes::gettimeofday() ]; my $sum = 0; for (my $i = 0; $i < 32000; $i++) { $sum = $sum + $i; } my $elapsedTime = Time::HiRes::tv_interval($startTime); print "Elapsed time: $elapsedTime sec\n"; }}} ---- {{{#!plain $ ./a.pl Elapsed time: 0.003942 sec }}}