control-event-1.3: Event scheduling system.

Safe HaskellSafe
LanguageHaskell2010

Control.Event.Relative

Description

This module uses Haskell concurrency libraries to build an extremely simple event system that should perform better than the Control.Event module but does not provide features such as STM action scheduling.

Synopsis

Documentation

addEvent :: Int -> IO () -> IO EventId Source #

'addEvent delay action' will delay for delay microseconds then execute action. An EventId is returned, allowing the event to be canceled.

delEvent :: EventId -> IO Bool Source #

'delEvent eid' deletes the event and returns True if the event was deleted. If False is returned then the time elapsed and the action was forked off.