Timer

From GMod Wiki

Jump to: navigation, search

A module that enables timed execution of functions.

If you call a method/function with no arguements (for example, MyFunc()) then the function arguement must be nil. For example: timer.Simple(1, MyFunc, nil). (elevator)

If you want to call a function part of the self: object, you can do this: timer.Simple(1, function() self:FunctionName() end) using a dummy function.

Note: If a timer is started serverside on a dedicated server, it will only run if players are connected!

Library Functions

NewerShared.png timer.Adjust
NewerShared.png timer.Check
NewerShared.png timer.Create
NewerShared.png timer.Destroy
NewerShared.png timer.IsTimer
NewerShared.png timer.Pause
NewerShared.png timer.Remove
NewerShared.png timer.Simple
NewerShared.png timer.Start
NewerShared.png timer.Stop
NewerShared.png timer.Toggle
NewerShared.png timer.UnPause

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox