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.

-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net


On Thu, May 24, 2001 at 12:34:54PM -0400, Kirill wrote:
> When there are pending alarms but no handles, select() is called
> to sleep with subsecond precision, as advertised in select(2).
> 
> However, on Win32 it does not seem to work like that. Instead,
> select() returns immediately (with a failure, I believe).
> 
> When there are no handles and the timeout is > 0, could we try
> calling Time::HiRes::usleep instead? Don't know if that's more
> portable, but I think I heard somewhere that Time::HiRes is
> going to become a core module soon.
> 
> Otherwise, when there are no handles and the timeout is >= 1,
> could we call sleep(int($timeout)) before calling select()?
> 
> Kirill
> 
> 

Reply via email to