Module

Signal.Time

Package
purescript-signal
Repository
bodil/purescript-signal

#Time Source

type Time = Number

#every Source

every :: Time -> Signal Time

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

#delay Source

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

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

#since Source

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 Source

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 Source

#now Source

now :: Effect Time

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