I've released control-event (on hackage.haskell.org), which provides a system to schedule and cancel IO events for given System.Time.ClockTimes. While designed prior to the release of Control.Timeout, it is very similar, the main differences are:
- Control.Event requires initilization while Control.Timeout hides this via unsafePerformIO.
- Control.Event can add events in the STM monad using addEventSTM. While Control.Timeout has an addEventAtomic, they aren't drop in replacements for each other (addEventAtomic is an IO action that returns an STM operation).
- Control.Timeout externally interfaces by time deltas (Float) while Control.Event is based on absolute ClockTimes.
- Control.Timeout uses only one Haskell thread while Control.Event needs two.
- Control.Event will not duplicate EventIds once the counter overflows. The possibility of this happening in Control.Timeout is entirely theoretical - I'm not claiming there is a practical difference.
- I'll either expand or eliminate the extra features of Event Preprocessing.
- If no one uses it, I'll probably be getting rid of the ability to run expired actions in the event system thread.
- I'm guessing Data.Time works on Windows. So long as I don't learn otherwise, I'll move from the old-time package to the 'time' package.
- I'll add a shim to allow adding events using time deltas.
EDIT: I should add that Control.Timeout performs MUCH better.
Let me know if you find this useful!