timer.Destroy
From GMod Wiki
(Redirected from Timer.Remove)
| Function | |
| Syntax |
timer.Destroy( String Name ) Where is this used? |
| Description: | |
| Destroys a timer by name so that it cannot be started again. | |
| Returns: | nil |
| Part of Library: | Timer |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Timer.Destroy]Timer.Destroy [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Creates a new timer then removes it. |
|---|---|
| Used on | |
| Code | timer.Create("Timer1", 1, 1, somefunction) timer.Destroy("Timer1") |
| Output | N/A |
Additional Notes
- Name - This is the unique name of the timer to remove.
- Only used with a named timer (ie, timers created using timer.Create).
- This function is the same as timer.Remove.
- This has on occasion caused issues if called from inside a timer. If you want to stop a timer while it is running from within itself/another timer, use timer.Stop. The general effect is the same.