Class Chrono

A Chrono class (extends Singleton)

Usage:

    c = Chrono.getInstance!
    

Functions

chrono.new () constructor.

Methods

chrono\getTimersCount () will return the number of active timers.
chrono\create (owner, duration, repeated, alwaysUpdate, onDone) creates a timer.
chrono\update (dt) updates the active timers.


Functions

chrono.new ()
constructor.

Methods

chrono\getTimersCount ()
will return the number of active timers.

Returns:

    number
chrono\create (owner, duration, repeated, alwaysUpdate, onDone)
creates a timer. This timer will be removed automatically from owner if "chrono" is the key for the timer instance. You can set it to be repeated with the same duration and onDone callback.

Parameters:

  • owner Control
  • duration number
  • repeated boolean
  • alwaysUpdate bool
  • onDone function

Returns:

    table
chrono\update (dt)
updates the active timers.

Parameters:

  • dt number
generated by LDoc 1.5.0 Last updated 2024-01-14 01:18:20