-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The win32 API has a SetTimer() function that lets you pass a callback procedure to be
called when the specified time period has elapsed. Maybe it would be possible to
implement this in Perl?
- -----Original Message-----
From: Mike Blazer [mailto:[EMAIL PROTECTED]]
Sent: April 27, 2000 14:26
To: Perl-Win32-Users Mailing List
Cc: Perl-Win32-Users Mailing List
Subject: Re: Thoughts on alarm()
Clinton Pierce wrote:
>
> I want alarm() under Win32 so badly, I can taste it.
>
> However, since I can't get there from here, I'm looking at workarounds.
well, Win32::Process and Win32::Event are your friends. Start the new process and
check for event (say "it's my killer" event) after each part that takes some
significant time, say 0.5 sec. Then from parent or from any other program you'll be
able to set that event. The child however can do what you want on that event - for
example exit with some exitcode.
I'm using this technique very often - 4 example to give a real timeout for some net
job.
HTH
- --
==================================
Mike Blazer
[EMAIL PROTECTED]
http://base.dux.ru/guest/fno/perl/
==================================
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>
iQA/AwUBOQiL8D1j58pgs53KEQLovwCgpQFYSeHQixdQzcxpCJhLrrmRTbkAoJhL
4f6n0+zNfSkJ10tNwNdSB8sb
=Z/K1
-----END PGP SIGNATURE-----
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]