File Timer.lua

Functions

Timer:isElapsed () Determine if time interval has elapsed.
Timer:new (t) Constructor for new instance.
Timer:newClass (t) Constructor for extending class.
Timer:nod () Sleep for just a brief moment (.1 to 1 second), as specified by 'incr', typically in constructor.
Timer:start (interval) Start timer


Functions

Timer:isElapsed ()
Determine if time interval has elapsed.

Usage:

  • really this needs to determine whether to wake up, whether time has elapsed or not (does not need to take shutdown into consideration, but does need to account for everything else).
  • do not call unless timer is known to have been started, and thus start-time and interval are defined. 
Timer:new (t)
Constructor for new instance.

Parameters:

  • t:
Timer:newClass (t)
Constructor for extending class.

Parameters:

  • t:
Timer:nod ()
Sleep for just a brief moment (.1 to 1 second), as specified by 'incr', typically in constructor.
Timer:start (interval)
Start timer

Parameters:

  • interval: (number) must be specified either here or upon construction, or both.

Valid XHTML 1.0!