It's customary to speak of wavelengths, and similar periodicities, in water waves. But when one examines the ocean, it turns out that waves are far from regular in shape and period. Today I went to the oceanside, and recorded a 3-minute video of waves coming ashore and crashing over a large rock. There was a moderate but steady breeze from
(
Read more... )
Comments 1
# timedist.pl
# Watches as the user presses keys, until q key is pressed.
# Reports stats on the time distribution between key presses.
# Used to collect info about a process the user is watching.
use Time::HiRes gettimeofday ;
print "This program reports stats on time intervals between\n";
print "presses of the Enter key. Press the Enter key as many\n";
print "times as you wish. Then type the letter q (lower case)\n";
print "and press Enter one last time, to calculate statistics.\n";
# np is number of key presses.
$np = 0;
$haveone == 0;
$wantmore = 1;
while ($wantmore > 0) {
$ch = getc(STDIN);
if ($ch eq "q") {
$wantmore = 0;
} else {
if ($haveone < 1) {
$haveone = 1;
$tlast = time();
} else {
$tthis = Time::HiRes::time();
$tint = $tthis - $tlast;
printf "%8.2f sec ", $tint;
$np++;
$tints[$np] = $tint;
$tlast = $tthis;
};
};
};
$totint = 0;
for ($i = 1; $i <= $np; $i ( ... )
Reply
Leave a comment