Copyright | (c) axionbuster 2025 |
---|---|
License | BSD-3-Clause |
Safe Haskell | None |
Language | GHC2021 |
This module provides functionality for running actions at controlled intervals with adaptive timing adjustments.
Timing Control
:: forall (es :: [Effect]) b. (IOE :> es, Concurrent :> es) | |
=> TVar Double | Target frequency in Hz (stored in |
-> Eff es () | Action to execute periodically |
-> Eff es b |
Executes an action periodically with adaptive timing control.
The function ensures the action runs at a target frequency by adjusting delays between executions based on execution time.
tick ratevar action -- Runs 'action' at frequency specified by rateVar (in Hz)