Sounds like a good job for Perl threads, a fork, or maybe a seperate
process.

Stable threads are only available in 5.8, and would probably be the best way
to go about it.
http://www.perl.com/pub/a/2002/09/04/threads.html

Forking would be messy I would think.  A seperate process might be ok, but
you would probably need to use something like a memory sharing module or
database to share data between processes.

I have little to no experience with most of that stuff, so I can't offer
anything other than these ideas.

Rob


-----Original Message-----
From: dan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 9:53 AM
To: [EMAIL PROTECTED]
Subject: Timers?


I'm writing IRC services in perl (some say it's a bad idea, others good, I
personally don't care what the language is, it has a fast response time and
does what I want it to do), however I need to have a sub to check bans every
second, to see if it should time them out and remove them. I have the time
to expire it in unix timestamp seconds:
$akill{$host}->{expires}
I need to make a sub to run through all the %akill keys one by one every
second to check if it should time them out. However I need it so the timer
doesn't interfere with the rest of the code, i.e responding to users on the
network normally as if the timer isn't even working.

Any clues?

Dan



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to