Hi,
I want to set a timer that will simply keep on doing something with a few seconds in between.
I tried the following, but it simply exists while the perl program should keep "printing time" every 2 seconds.
use Time::HiRes qw ( setitimer ITIMER_VIRTUAL time );
$SIG{VTALRM} = sub { print time, "\n" };
setitimer(ITIMER_VIRTUAL, 10, 2.5);
Greetings.
Start Free Trial