Home > @theatre/dataverse > Ticker

Ticker class

Signature:

export default class Ticker 

Constructors

Constructor Modifiers Description
(constructor)() Constructs a new instance of the Ticker class

Properties

Property Modifiers Type Description
time number

Methods

Method Modifiers Description
offNextTick(fn)
offThisOrNextTick(fn)
onNextTick(fn) Registers a side effect to be called on the next tick.
onThisOrNextTick(fn) Registers for fn to be called either on this tick or the next tick.If registerSideEffect() is called while Ticker.tick() is running, the side effect _will_ be called within the running tick. If you don't want this behavior, you can use registerSideEffectForNextTick().Note that fn will be added to a Set(). Which means, if you call registerSideEffect(fn) with the same fn twice in a single tick, it'll only run once.
tick(t)