-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Scalable timer
--
-- Scalable timer functions provided by a timer manager.
@package time-manager
@version 0.1.0
module System.TimeManager
-- | A timeout manager
type Manager = Reaper [Handle] Handle
-- | An action to be performed on timeout.
type TimeoutAction = IO ()
-- | A handle used by Manager
data Handle
-- | Creating timeout manager which works every N micro seconds where N is
-- the first argument.
initialize :: Int -> IO Manager
-- | Stopping timeout manager with onTimeout fired.
stopManager :: Manager -> IO ()
-- | Killing timeout manager immediately without firing onTimeout.
killManager :: Manager -> IO ()
-- | Call the inner function with a timeout manager. stopManager is
-- used after that.
withManager :: Int -> (Manager -> IO a) -> IO a
-- | Call the inner function with a timeout manager. killManager is
-- used after that.
withManager' :: Int -> (Manager -> IO a) -> IO a
-- | Registering a timeout action.
register :: Manager -> TimeoutAction -> IO Handle
-- | Registering a timeout action of killing this thread.
registerKillThread :: Manager -> TimeoutAction -> IO Handle
-- | Setting the state to active. Manager turns active to inactive
-- repeatedly.
tickle :: Handle -> IO ()
-- | Removing the Handle from the Manager immediately.
cancel :: Handle -> IO ()
-- | Setting the state to paused. Manager does not change the value.
pause :: Handle -> IO ()
-- | Setting the paused state to active. This is an alias to tickle.
resume :: Handle -> IO ()
data TimeoutThread
TimeoutThread :: TimeoutThread
instance GHC.Exception.Type.Exception System.TimeManager.TimeoutThread
instance GHC.Show.Show System.TimeManager.TimeoutThread