I see, I didn't expect that Time::HiRes was going to vary between platforms. It was just a toy thing anyway. Just remove the "use Time::HiRes" line, and change the setup_serial_interface subroutine to:
sub setup_serial_interface { #my $seconds_per_transmission = 0.567; my $seconds_per_transmission = 1; $SIG{ALRM} = sub { push @serial_data, rand; alarm $seconds_per_transmission; }; # First packet of data should occur in a couple seconds #alarm 2.5; alarm 3; }
and it should work just fine for you. (I just made those changes to my local copy and tried it out, it still works here, and shouldn't give you the error you reported.)
The Time::HiRes was included simply so I could use fractional seconds for the alerts, it wasn't really important.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^5: Win32 Serial Read input from device
by roboticus
in thread Win32 Serial Read input from device
by PilotinControl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |