@hackage / async-timer

Provides API for timer based execution of IO actions

Latest0.2.0.0

About

Metadata

  • Last updated , by mtesseract
  • License BSD-3-Clause
  • Categories Concurrency
  • Maintained by: mtesseract@silverratio.net

  • Lottery factor: 0

Links

Installation

Package Flags

Use the -f option with cabal commands to enable flags

    devel (off by default)

Readme

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"