class Delay

A timer class that is triggered when a user defined delay time has elapsed.

If the delay is started in retrigger mode, the delay automatically restarts from the last trigger point.

Constructors

Delay ()Constructs a new delay object.

Methods

int Elapsed ()Indicates whether the delay has elapsed or not.
Start (const float)Starts the timer and sets the delay time to the specified number of milliseconds.
Start (const float, const int)Starts the timer and sets the delay time and retrigger mode.
int Started ()Returns true if the delay is currently running, false if it is currently stopped.
Stop ()Stops the timer.

Reference

method Delay ()

Constructs a new delay object.


method int Elapsed ()

Indicates whether the delay has elapsed or not.

If the delay has elapsed and is not in retrigger mode, the result of this function is permanently true until the delay is stopped. If it has elapsed and is in retrigger mode, the result is true only once and the timer is restarted. Subsequent calls will then return false until the delay elapses again.


method Start (const float delay)

Starts the timer and sets the delay time to the specified number of milliseconds.


method Start (const float delay, const int retrig)

Starts the timer and sets the delay time and retrigger mode.


method int Started ()

Returns true if the delay is currently running, false if it is currently stopped.


method Stop ()

Stops the timer.

If the delay is stopped, the result of Elapsed() resets to false.