#!/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";
$ ./a.pl Elapsed time: 0.003942 sec
Perl
시간 측정
Retrieved from http://hyacinth.byus.net/moniwiki/wiki.php/Perl/밀리세컨드 시간 측정
last modified 2017-11-07 14:51:13