If I read the messages correctly, you need to keep refreshing a timer
whenever activity occurs. POE::Kernel's alarm() and delay() methods
do this: they clear existing timed events for the given state before
setting new ones.
So every time you call this:
$kernel->delay( timeout => 5 );
The previous 'timeout' delay is cleared and a new one is set for five
seconds into the future. To clear the delay it without setting a new
one, you would call this:
$kernel->delay( 'timeout' );
Since delay() clears the previous one (if any), it removes the old
'timeout' delay. Since there is no time for a new 'timeout', no new
one is set.
This may not help if I misunderstood your previous message.
-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net
On Thu, May 24, 2001 at 06:24:51PM -0400, Kirill wrote:
> Great! Are we going to have an official way to do timeouts in
> the next release? Or did I miss something that's already there?
>
> Kirill
>
>
> > I've patched POE::Kernel to import Time::HiRes' sleep() along with
> > time(), if the module is available. This sleep() will convert floats
> > into usecs and call usleep internally.
> >
> > I've patched POE::Kernel::Select to use sleep() (which may be
> > Time::HiRes' if available) when there are no filehandles and $^O eq
> > 'MSWin32'. Otherwise it still uses four-argh select().
> >
> > This'll be in the next release.
>
>