in reply to Alarm::Concurrent

Well kibble my bits and call me red, but a developer I work with on an open source project (Peep: The Network Auralizer) just implemented about the same thing for a dire need we had. This is something that when you need, you really need.

Are you planning on submitting your Alarm::* packages to the CPAN? You should.

One additional feature that I implemented in his code (which you may find useful to implement) is to have repeated events triggered; that is, if you need to have something go off every 5 seconds rather than just once 5 seconds from now, you can do that.

The way I did it was rather cheesy, but works: Each handler has a callback (typically a closure) and some associated data structure with metadata about the callback. If it is a repeated event, the handler just reschedules itself before it invokes the callback.

I really enjoyed reading your submission!

-Collin