async-timer

Provides API for timer based execution of IO actions https://github.com/mtesseract/async-timer

Version on this page:0.1.4.0
LTS Haskell 9.14:0.1.4.0
Stackage Nightly 2017-11-19:0.1.4.0
Latest on Hackage:0.1.4.0
BSD3 licensed by Moritz Schulte
Maintained by mtesseract@silverratio.net

Module documentation for 0.1.4.0

async-timer Hackage version Stackage version Build Status

About

This is a lightweight package built on top of the async package providing easy to use periodic timers. This can be used for executing IO actions periodically.

Example:

      let conf = defaultTimerConf & timerConfSetInitDelay  500 -- 500 ms
                                  & timerConfSetInterval  1000 -- 1 s
    
      withAsyncTimer conf $ \ timer -> do
        forM_ [1..10] $ \_ -> do
          timerWait timer
          putStrLn "Tick"
comments powered byDisqus