timerSignal

G
W

This is very similar to rxjs's timer operator. It will be have like setTimeout or interval depending on the parameters passed. The value of the timer is incremented after every "tick".

Intervals stay aligned to their intended timeline when callback execution is delayed. By default, missed ticks are discarded and the tick count represents callbacks delivered by the timer. Set missedTickBehavior to 'coalesce' to emit once while advancing the count to its logical position on the elapsed interval timeline.

The signal has methods to pause, resume and restart the timer. Additionally, there is a state signal that will return the current state of the timer.

Timer and Interval Demo
Using a Selector