Skip to content

Timer

Bindings for @solid-primitives/timer.

type IntervalOrTimeout = (unit -> unit) -> int -> int     // setInterval or setTimeout

let makeTimer(callback: unit -> unit, timespan: int, policy: IntervalOrTimeout): DisposeCallback
let createTimer(callback: unit -> unit, timespan: int | Accessor<U2<bool, int>> | Accessor<bool> | Accessor<int>, policy: IntervalOrTimeout): unit
let createTimeoutLoop(callback: unit -> unit, timespan: int | Accessor<int>): unit
let createPolled(callback: unit -> 'T, timespan: int | Accessor<int>): Accessor<'T>
let createIntervalCounter(timespan: int | Accessor<int>): Accessor<int>
MemberDesc
makeTimerA timer that is cleaned up with its owner.
createTimermakeTimer with a reactive delay. Set the delay to false to turn the timer off.
createTimeoutLoopLike an interval from createTimer, but a new delay only takes effect after the callback runs.
createPolledCalls callback periodically and returns an accessor of its latest result.
createIntervalCounterA counter that goes up by one on each interval.
Edit this page