HolyLib Wiki

systimer

systimer

This module is just the timer library, but it doesn't use CurTime.
Supports: Linux32 | Linux64 | Windows32 | Windows64

Timer repetitions are limited to an unsigned int.

Methods

boolean systimer.Adjust( string name, number delay, number reps = nil, function callback = nil )
Adjusts the timer with the given name with the new values.
Returns true if the timer was successfully adjusted.
systimer.Check()
Does nothing We advise against using this. It may be changed or removed in a future update.
systimer.Create( string name, number delay, number reps, function callback )
Creates a timer with the given name.
boolean systimer.Exists( string name )
Returns true if the given timer exists.
boolean systimer.Pause( string name )
Returns true if the given timer was successfully paused.
systimer.Remove( string name )
Removes the given timer.
number systimer.RepsLeft( string name )
Returns the number of reps left for the given timer.
Returns 0 if the timer wasn't found or the reps are below 0.
systimer.Simple( number delay, function callback )
Creates a simple timer.
boolean systimer.Start( string name )
Returns true if the given timer was successfully started again.
boolean systimer.Stop( string name )
Returns true if the given timer was successfully stopped.
number systimer.TimeLeft( string name )
Returns the time left until the given timer is executed again. Returns 0 if the timer wasn't found.
boolean systimer.Toggle( string name )
Toggles the given timer. Returns true if the timer was activated/started again.
boolean systimer.UnPause( string name )
Unpauses the given timer. Unlike systimer. Start this won't reset the time left until it executes again.