twee-lib-2.4.2: An equational theorem prover
Safe HaskellSafe-Inferred



A module which can run housekeeping tasks every so often.



data Task m a Source #

A task which runs in the monad m and produces a value of type a.

newTask :: MonadIO m => Double -> Double -> m a -> m (Task m a) Source #

Create a new task that should be run a certain proportion of the time. The first argument is how often in seconds the task should run, at most. The second argument is the maximum percentage of time that should be spent on the task.

checkTask :: MonadIO m => Task m a -> m (Maybe a) Source #

Run a task if it's time to run it.