Module

Zeta.Time

Package
purescript-zeta-extra
Repository
athanclark/purescript-zeta-extra

#every Source

every :: Milliseconds -> Effect { id :: IntervalId, signal :: Signal (read :: READ, write :: WRITE) Instant }

Every n milliseconds, relay the current instant in the signal. Also, return the IntervalId that is writing to the signal.

#delay Source

delay :: forall a rw. Milliseconds -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) a)

Create a new signal, which re-emits written values to the input signal, but by a delay of n milliseconds.

#since Source

since :: forall a rw. Milliseconds -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) Boolean)

Is true if the signal has been written to before n milliseconds - false if after the time limit.

#debounce Source

debounce :: forall a rw. Milliseconds -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) a)

Re-emits changes to the input signal, only if the change occurred after the time limit.