Safe Haskell | None |
---|---|
Language | Haskell2010 |
Periodic clocks are defined by a stream of ticks with periodic time differences. They model subclocks of a fixed reference clock. The time differences are supplied at the type level.
Documentation
data Periodic (v :: [Nat]) where Source #
A clock whose tick lengths cycle through
a (nonempty) list of type-level natural numbers.
E.g. Periodic '[1, 2]
ticks at times 1, 3, 4, 5, 7, 8, etc.
The waiting side effect is formal, in ScheduleT
.
You can use e.g. runScheduleIO
to produce an actual delay.