| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
FRP.Rhine.Clock.Realtime.Millisecond
Description
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
Constructors
| Millisecond (WaitUTCClock IO (RescaledClock (UnscheduleClock IO (FixedStep n)) Double)) |
Instances
| Clock IO (Millisecond n) Source # | |
Defined in FRP.Rhine.Clock.Realtime.Millisecond Methods initClock :: Millisecond n -> RunningClockInit IO (Time (Millisecond n)) (Tag (Millisecond n)) Source # | |
| GetClockProxy (Millisecond n) Source # | |
Defined in FRP.Rhine.Clock.Realtime.Millisecond Methods 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 | |