Re: How to alarm under 1 second?

2003-02-10 Thread zentara
On Mon, 10 Feb 2003 12:41:57 +0100, [EMAIL PROTECTED] (Angerstein) wrote: >If I need an alarm signal alarm(), in less than 1 second what can I do? Interestingly enough, this just showed up on perlmonks this morning. http://www.perlmonks.org/index.pl?node_id=23402 Simultaneous alarms under 1 sec

Re: How to alarm under 1 second?

2003-02-10 Thread Jeff 'japhy' Pinyan
On Feb 10, Angerstein said: >sub selfalarm { > $waittime = @_; Above is your problem. You are assigning the NUMBER of elements in @_ to $waittime, not the first element. Use one of the following: my $waittime = shift; my ($waittime) = @_; my $waittime = $_[0]; >$ppid = getppid(); >

RE: How to alarm under 1 second?

2003-02-10 Thread NYIMI Jose (BMB)
or what you need. http://search.cpan.org/author/JHI/Time-HiRes-1.42/HiRes.pm#SYNOPSIS HTH, José. > -Original Message- > From: Angerstein [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 10, 2003 12:42 PM > To: Mailinglist Perl Beginners > Subject: How to alarm under 1 sec

How to alarm under 1 second?

2003-02-10 Thread Angerstein
Hello, I have aquestions. If I need an alarm signal alarm(), in less than 1 second what can I do? Would that work? sub selfalarm { $waittime = @_; if ($pid = fork){ } else { $ppid = getppid(); select (undef,undef,undef, $waittime); kill 14 => ppid; } } SIG{ALRM} = su