'timer'에 해당되는 글 1건

  1. 2010.08.16 [PERL] Timer

[PERL] Timer

CS/Shell/Perl/Python 2010. 8. 16. 12:44
#!/usr/bin/perl                                                                                                                                                 

use Time::HiRes qw(ITIMER_REAL setitimer);

$SIG{ALRM} = sub {
    print "Alarm\n";
};


setitimer(ITIMER_REAL, 0.1, 5);
while (1)
{
    sleep ;
    print "Main Loop\n";
}
: