reactive-0.9.0: Simple foundation for functional reactive programmingSource codeContentsIndex
FRP.Reactive.Internal.Clock
Stabilityexperimental
Maintainerconal@conal.net
Description

Serializing clocks

Thanks to Luke Palmer for help with this module.

Synopsis
data Clock t = Clock {
cGetTime :: IO t
cSerialize :: Serial
}
makeClock :: IO (Clock TimeT)
Documentation
data Clock t Source

Waits a specified duration and then execute an action type Delay t = t -> forall a. IO a -> IO a

Waits until just after a specified time and then execute an action, passing in the actual time. type Schedule t = t -> Sink (Sink t)

A serializing clock. Can (a) produce a time and (b) serialize an action.

Constructors
Clock
cGetTime :: IO t
cSerialize :: Serial
makeClock :: IO (Clock TimeT)Source
Make a clock, given a way to delay actions. For instance, the delay could be sleepThen in thread-safe situations, but could also involve a GUI toolkit wake-up event.
Produced by Haddock version 2.3.0