async-timer: Provides API for timer based execution of IO actions

[ bsd3, concurrency, library ] [ Propose Tags ] [ Report a vulnerability ]

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.


[Skip to Readme]

Modules

[Index]

Flags

Manual Flags

NameDescriptionDefault
develDisabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.4.0, 0.1.4.1, 0.2.0.0
Dependencies async (>=2.2.1 && <2.3), base (>=4.9.1.0 && <5), safe-exceptions (>=0.1.7.0 && <0.2), unliftio (>=0.2.4.0 && <0.3), unliftio-core (>=0.1.1.0 && <0.2) [details]
License BSD-3-Clause
Copyright (c) 2016-2018 Moritz Clasmeier
Author Moritz Clasmeier
Maintainer mtesseract@silverratio.net
Category Concurrency
Home page https://github.com/mtesseract/async-timer#readme
Bug tracker https://github.com/mtesseract/async-timer/issues
Source repo head: git clone https://github.com/mtesseract/async-timer
Uploaded by mtesseract at 2018-02-28T20:40:09Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 19747 total (131 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-02-28 [all 1 reports]

Readme for async-timer-0.2.0.0

[back to package description]

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"