cmdWhistle.pl patch
diff -c /Users/alex/Desktop/cmdWhistle.pl\~ /Users/alex/Desktop/cmdWhistle.pl
- ** /Users/alex/Desktop/cmdWhistle.pl~ Fri Dec 8 12:41:52 2006
--- /Users/alex/Desktop/cmdWhistle.pl Tue Jul 3 14:30:28 2007
- **************
- ** 2,9 ****
# heavily influenced by knockAge.pl for timing and disambiguation
use strict;
! $|=1; #for non buffered standard output
! require 'sys/syscall.ph'; # for subsecond timing
my $option = $ARGV[0] || ""; # simple option handling
--- 2,9 ----
# heavily influenced by knockAge.pl for timing and disambiguation
use strict;
! $|=1; #for non buffered standard output
! use Time::HiRes qw( gettimeofday ); # for subsecond timing
my $option = $ARGV[0] || ""; # simple option handling
- **************
- ** 31,57 ****
# begin subroutines
sub getEpochMicroSeconds {
!
! my $TIMEVAL_T = "LL"; # LL for microseconds
! my $timeVal = pack($TIMEVAL_T, ());
!
! syscall(&SYS_gettimeofday, $timeVal, 0) != -1 or die "micore seconds: $!";
! my @vals = unpack( $TIMEVAL_T, $timeVal );
! $timeVal = $vals[0] . $vals[1];
! $timeVal = substr( $timeVal, 6);
!
! my $padLen = 10 - length($timeVal);
! $timeVal = $timeVal . "0" x $padLen;
!
! return($timeVal);
}#getEpochMicroSeconds
sub getEpochSeconds {
! my $TIMEVAL_T = "LL"; # LL for microseconds
! my $start = pack($TIMEVAL_T, ());
! syscall(&SYS_gettimeofday, $start, 0) != -1 or die "seconds: $!";
! return( (unpack($TIMEVAL_T, $start))[0] );
}#getEpochSeconds
sub readTones
--- 31,44 ----
# begin subroutines
sub getEpochMicroSeconds {
! my ($seconds, $microseconds) = gettimeofday;
! return($microseconds);
}#getEpochMicroSeconds
sub getEpochSeconds {
! my ($seconds, $microseconds) = gettimeofday;
! return($seconds);
}#getEpochSeconds
sub readTones
Diff finished. Tue Jul 3 14:33:19 2007
Comments
(Please contact me if you want to remove your comment.)
⁂
Can you, or anyone who reads this, please upload the cmdWhistle.pl (the full file).
I wanted to set this up on my machine but I can’t seem to find a copy of cmdWistle.pl... Or is there a new and better way of doing this now?
cheers,
Simon
– simon 2013-10-31 03:04 UTC
---
I think I rage-quit the entire experiment and deleted everything... 2007-07-03 Just Whistle.
2007-07-03 Just Whistle
– Alex Schroeder 2013-10-31 08:00 UTC
Alex Schroeder