A Ticker containing a channel that will send the current time on the channel after each tick. The period of the ticks is specified by the duration argument. The ticker will adjust the time interval or drop ticks to make up for slow receivers. The duration d must be greater than zero; if not, NewTicker will throw exception

Hierarchy

  • Ticker

Constructors

Properties

Accessors

c

Methods

Constructors

Properties

c_: undefined | Chan<Date>
callback?: ValueCallback<Date>
t_: undefined | number

Accessors

Methods

  • Reset stops a ticker and resets its period to the specified duration.

    Throws

    TimeException if ms <= 0

    Parameters

    • ms: number

    Returns void

  • Stop turns off a ticker. After Stop, no more ticks will be sent.

    Returns void

Generated using TypeDoc