Class Ticker

Summary


 A class for an object with a ticker.
 This class should be subclassed by a class that wishes to
 have a ticker facility, namely implement a method that is
 called repeatedly at set intervals.

Package:
(main)
File:
_ticker.icn
Methods:
is_ticking, retime_ticker, set_ticker, stop_ticker, tick

Fields:
next_tick_time, ticker_rate

Source code.

Details
Constructor

Ticker(ticker_rate, next_tick_time)

Parameters:
ticker_rate
Ticker rate
next_tick_time
Time of next tick

Methods:

is_ticking()

#
  Succeeds if and only if the ticker is active.


retime_ticker(n)

#
  Change the interval of the ticker
  @param n   the new interval.


set_ticker(n)

#
  Start the ticker process, with the {tick()}
  method being invoked approximately every {n} milliseconds.

  @param n   the ticker interval in milliseconds.


stop_ticker()

#
  Stop the ticker.


tick()

#
  This method should be overridden by the subclass.  It will
  be called repeatedly.


Fields:
next_tick_time -- Time of next tick

ticker_rate -- Ticker rate


This page produced by UniDoc on 2021/04/15 @ 23:59:54.