every-0.0.1: Run a process every so often.

Safe HaskellSafe
LanguageHaskell2010

Control.Concurrent.Async.Every

Synopsis

Documentation

every Source #

Arguments

:: Int

time difference in microseconds

-> Maybe Int

initial delay before first invocation

-> IO a 
-> IO ThreadId 

Spawn a process forever

everyForking :: Int -> Maybe Int -> IO a -> IO (ThreadId, TChan (Async a)) Source #

everyFunc Source #

Arguments

:: (Int -> Int)

function from total time spent, to the time to delay from now

-> IO a 
-> IO ThreadId 

everyFuncForking :: forall a. (Int -> Int) -> IO a -> IO (ThreadId, TChan (Async a)) Source #

A version of everyFunc which forks every time *coolshades*.