Provides API for timer based execution of IO actions

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

See all snapshots async-timer appears in

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

Module documentation for

This version can be pinned in stack with:[email protected]:406d2233c98788d4a9608c9c74ecd1f445d8173920b4b39cb22cc78792ff3f41,2002

async-timer Hackage version Stackage version Build Status


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.


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