This is a small example of a "real-time" subroutine:
# calls this sub each 3 seconds... local $SIG{ALRM} = sub { print "alarm "; alarm 3; }; $| = 1; # no output buffer alarm 3; # start subroutine timer # main program for (1..100) { print "running "; sleep 1; }
In reply to Re: Running in 'RealTime'
by fglock
in thread Running in 'RealTime'
by Kiloapound
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |