Garry's Mod Wiki

Revision Difference

util.Timer#544195

<function name="Timer" parent="util" type="libraryfunc"> <description>Creates a timer object.</description> <realm>Shared and Menu</realm> <file line="213">lua/includes/extensions/util.lua</file> <args> <arg name="startdelay" type="number" default="0">How long you want the timer to be.</arg> </args> <rets> <ret name="" type="table">A timer object. It has next methods: ;Reset() - Resets the timer to nothing ;Start( time ) - Starts the timer, call with end time ;Started() - Returns true if the timer has been started ;Elapsed() - Returns true if the time has elapsed</ret> ⤶ `Reset()` - Resets the timer to nothing ⤶ `Start( time )` - Starts the timer, call with end time ⤶ `Started()` - Returns true if the timer has been started ⤶ `Elapsed()` - Returns true if the time has elapsed</ret> </rets> </function>