Timer
Summary
Timers can be used to call functions at a predetermined time (or multiple times)
Class Methods
Timer:Set(fn, interval, delay, repeats)
Sets up a function to be called in the future
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
fn | function | The function to call | |
interval | number | How long to wait inbetween repeated calls | |
delay | number | 0 | How long to wait until the first call |
repeats | number | -1 | The number of times to call the function. A value of -1 means "run forever" |
Example
Timer:Unset(fn)
Removes a future function timer
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
fn | function | The function to remove |
Example
Last updated