async-timer

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

Version on this page:0.1.4.1
LTS Haskell 15.15:0.2.0.0
Stackage Nightly 2020-06-04:0.2.0.0
Latest on Hackage:0.2.0.0

See all snapshots async-timer appears in

BSD-3-Clause licensed by Moritz Clasmeier
Maintained by [email protected]

Module documentation for 0.1.4.1

This version can be pinned in stack with:[email protected]:2f5c4ced218f0bce5872cee1f9eca94647a3ecb05ceacedccef1214cc39d68b7,1983

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"