Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Provides a clock that ticks at every multiple of a fixed number of milliseconds.
Synopsis
- newtype Millisecond (n :: Nat) = Millisecond (WaitUTCClock IO (RescaledClock (UnscheduleClock IO (FixedStep n)) Double))
- waitClock :: KnownNat n => Millisecond n
Documentation
newtype Millisecond (n :: Nat) Source #
A clock ticking every n
milliseconds, in real time.
Since n
is in the type signature,
it is ensured that when composing two signals on a Millisecond
clock,
they will be driven at the same rate.
For example,
ticks every 0.1 seconds, so 10 times per seconds.Millisecond
100
The tag of this clock is 'Maybe Double',
where Nothing
represents successful realtime,
and
a lag (in seconds).Just
lag
Instances
Clock IO (Millisecond n) Source # | |
Defined in FRP.Rhine.Clock.Realtime.Millisecond type Time (Millisecond n) Source # type Tag (Millisecond n) Source # initClock :: Millisecond n -> RunningClockInit IO (Time (Millisecond n)) (Tag (Millisecond n)) Source # | |
GetClockProxy (Millisecond n) Source # | |
Defined in FRP.Rhine.Clock.Realtime.Millisecond getClockProxy :: ClockProxy (Millisecond n) Source # | |
type Tag (Millisecond n) Source # | |
Defined in FRP.Rhine.Clock.Realtime.Millisecond | |
type Time (Millisecond n) Source # | |
Defined in FRP.Rhine.Clock.Realtime.Millisecond |