Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Control.Concurrent.STM.Timer
Documentation
newTimer :: Natural -> IO Timer Source #
Create a new timer with the supplied timer action and timer length,
newTimerRange :: Int -> (Natural, Natural) -> IO Timer Source #
Create a new timer with the supplied timer action, random seed, and range from which the the timer will choose a random timer length at each start or reset.
startTimer :: Timer -> IO Bool Source #
Start the timer. If the timer is already running, the timer is not started. Returns True if the timer was succesfully started.
resetTimer :: Timer -> IO () Source #
Resets the timer with a new random timeout.