ramus-0.1.2: Elm signal system for Haskell

Safe HaskellNone
LanguageHaskell2010

Ramus.Time

Synopsis

Documentation

type Time = Float #

every :: Time -> Signal Time #

Creates a signal which yields the current time (according to now) every |given number of milliseconds.

now :: IO Time #

Returns the number of milliseconds since an arbitrary, but constant, time |in the past.

delay :: Time -> Signal a -> Signal a #

Takes a signal and delays its yielded values by a given number of |milliseconds.

since :: Time -> Signal a -> Signal Bool #

Takes a signal and a time value, and creates a signal which yields True |when the input signal yields, then goes back to False after the given |number of milliseconds have elapsed, unless the input signal yields again |in the interim.

debounce :: Time -> Signal a -> Signal a #

Takes a signal and a time value, and creates a signal which waits to yield |the next result until the specified amount of time has elapsed. It then |yields only the newest value from that period. New events during the debounce |period reset the delay.