root/misc/stopwatch

Revision 2058 (checked in by miyagawa, 13 years ago)

add stopwatch

  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2 use strict;
3 use Time::HiRes qw( gettimeofday usleep );
4
5 $| = 1;
6
7 my $start = gettimeofday;
8 while (1) {
9     my $time = gettimeofday - $start;
10     printf "%.2f\r", $time;
11     usleep 0.01;
12 }
13
Note: See TracBrowser for help on using the browser.