Copyright | (c) 2017 Harendra Kumar |
---|---|

License | BSD3 |

Maintainer | harendra.kumar@gmail.com |

Stability | experimental |

Portability | GHC |

Safe Haskell | Safe |

Language | Haskell2010 |

Deprecated: Please use the "rate" combinator instead of the functions in this module

Time utilities for reactive programming.

# Documentation

periodic :: Int -> IO () -> IO () Source #

Run an action forever periodically at the given frequency specified in per second (Hz).

*Since: 0.1.0*

withClock :: IO Int -> Int -> (Int -> IO ()) -> IO () Source #

Run a computation on every clock tick, the clock runs at the specified frequency. It allows running a computation at high frequency efficiently by maintaining a local clock and adjusting it with the provided base clock at longer intervals. The first argument is a base clock returning some notion of time in microseconds. The second argument is the frequency in per second (Hz). The third argument is the action to run, the action is provided the local time as an argument.

*Since: 0.1.0*