Module

Signal.Time

#Time

type Time = Number

#every

every :: Time -> Signal Time

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

#delay

delay :: forall a. Time -> Signal a -> Signal a

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

#since

since :: forall a. Time -> Signal a -> Signal Boolean

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

debounce :: forall a. 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.

#millisecond

#now

now :: Effect Time

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

#second

Modules