Library timer

Deals with time and timers.

Functions

adjust (name) Adjusts a timer
create (name, delay, reps, func) Creates (and starts) a timer
curtime () Same as GLua's CurTime()
frametime () Returns time between frames on client and ticks on server.
pause (name) Pauses a timer
realtime () Same as GLua's RealTime()
remove (name) Removes a timer
simple (delay, func) Creates a simple timer, has no name, can't be stopped, paused, or destroyed.
start (name) Starts a timer
stop (name) Stops a timer
systime () Same as GLua's SysTime()
unpause (name) Unpauses a timer


Functions

timer_library.adjust (name)
Adjusts a timer

Parameters:

  • name: The timer name
timer_library.create (name, delay, reps, func)
Creates (and starts) a timer

Parameters:

  • name: The timer name
  • delay: The time, in seconds, to set the timer to.
  • reps: The repititions of the tiemr. 0 = infinte, nil = 1
  • func: The function to call when the tiemr is fired
timer_library.curtime ()
Same as GLua's CurTime()
timer_library.frametime ()
Returns time between frames on client and ticks on server. Same thing as G.FrameTime in GLua
timer_library.pause (name)
Pauses a timer

Parameters:

  • name: The timer name
timer_library.realtime ()
Same as GLua's RealTime()
timer_library.remove (name)
Removes a timer

Parameters:

  • name: The timer name
timer_library.simple (delay, func)
Creates a simple timer, has no name, can't be stopped, paused, or destroyed.

Parameters:

  • delay: the time, in second, to set the timer to
  • func: the function to call when the timer is fired
timer_library.start (name)
Starts a timer

Parameters:

  • name: The timer name
timer_library.stop (name)
Stops a timer

Parameters:

  • name: The timer name
timer_library.systime ()
Same as GLua's SysTime()
timer_library.unpause (name)
Unpauses a timer

Parameters:

  • name: The timer name

Valid XHTML 1.0!