Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pure abstractions for time and clocks.
Documentation
checkNonNeg :: (Num a, Ord a, Show a) => a -> a Source
Check for a non-negative number.
tickOp :: (Real a, Real b) => (Rational -> Rational -> Rational) -> a -> b -> Tick Source
Apply a binary operation to two real numbers, returning a Tick.
A maybe-impure supplier of time, to a pure scheduled computation.
The type c
is the computational context where clock operations occur,
e.g. a Monad
such as IO
.
Clock implementations must be monotic. See System.Time.Monotonic for an example on how to wrap non-monotonic clocks. TODO: provide a generic monotonic wrapper.
Clock | |
|